Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Passing a reference to a User Control to a class in ASP2.0 (http://www.velocityreviews.com/forums/t123659-passing-a-reference-to-a-user-control-to-a-class-in-asp2-0-a.html)

Charlie@CBFC 04-13-2006 03:04 PM

Passing a reference to a User Control to a class in ASP2.0
 
Hi:

I'm trying to pass a reference to a user control to a class. The user
control exposes its elements via properties. When I inspect parameter (user
control is passed to class using "this") I can see it's data in debugger,
but no way to access it in class code. I have tried casting to control
type, but it says type or namespace can't be found. Any ideas?

Charlie



bruce barker \(sqlwork.com\) 04-13-2006 04:40 PM

Re: Passing a reference to a User Control to a class in ASP2.0
 
define a base class the control inherits from that defines the properties,
or better yet, have the control implement an interface with the desired
properties, then cast the control to the interface in the class.

-- bruce (sqlwork.com)

"Charlie@CBFC" <fineblumcb@verizon.net> wrote in message
news:Oq3%23puwXGHA.5012@TK2MSFTNGP05.phx.gbl...
> Hi:
>
> I'm trying to pass a reference to a user control to a class. The user
> control exposes its elements via properties. When I inspect parameter
> (user control is passed to class using "this") I can see it's data in
> debugger, but no way to access it in class code. I have tried casting to
> control type, but it says type or namespace can't be found. Any ideas?
>
> Charlie
>





All times are GMT. The time now is 01:23 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.