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

Discussion in 'ASP .Net' started by Charlie@CBFC, Apr 13, 2006.

  1. Charlie@CBFC

    Charlie@CBFC Guest

    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
     
    Charlie@CBFC, Apr 13, 2006
    #1
    1. Advertisements

  2. 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" <> wrote in message
    news:Oq3%...
    > 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\), Apr 13, 2006
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?YWJqb3Jr?=
    Replies:
    1
    Views:
    3,996
    Jeffrey Palermo
    May 5, 2004
  2. Jason Chan
    Replies:
    0
    Views:
    703
    Jason Chan
    Dec 3, 2005
  3. Mad Scientist Jr
    Replies:
    0
    Views:
    892
    Mad Scientist Jr
    Mar 22, 2006
  4. E11
    Replies:
    1
    Views:
    5,757
    Thomas Weidenfeller
    Oct 12, 2005
  5. Jeff
    Replies:
    4
    Views:
    860
    Peter_Julian
    Mar 8, 2006
  6. Jonathan Wood

    User Control to Control Other User Control

    Jonathan Wood, Jan 24, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    807
    Jonathan Wood
    Feb 2, 2010
  7. hmikki
    Replies:
    1
    Views:
    269
    Nathan Sokalski
    Oct 19, 2007
  8. Patrick
    Replies:
    6
    Views:
    710
    [MSFT]
    Nov 11, 2004
Loading...