Groups | Blog | Home
all groups > dotnet remoting > september 2004 >

dotnet remoting : Is it possible to pass web controls?



TJ Manigo via .NET 247
9/6/2004 7:58:34 PM
Hi, I have a bunch of subroutines that expect parameters of type Textbox and HTMLTableCell (i.e. Sub

uf_Test(ByVal loTextbox as Textbox). The problem is that these objects are not inherently serializable,

so whenever I call my remoting object, an excpetion gets raised.

Is there a workaround that does not require me to rewrite the said functions to remove these

parameters? Or maybe I can set System.Web.UI.Webcontrols as <Serializable()>?

Thanks.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

Ken Kolda
9/7/2004 1:59:44 PM
No -- if the class is neither serializable or derives from
MarshalByRefObject, you cannot pass it across a remoting layer. Besides, if
the remoted component is your business layer, you wouldn't want to pass UI
elements to it anyway -- that ties your business layer to a UI
implementation.

As for marking WebControl as Serializable, you can't do that. A control
object is most definitely not serializable and trying to force it to be
would be futile.

Ken


[quoted text, click to view]

AddThis Social Bookmark Button