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. Advertising

  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. Advertising

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. Patrick Olurotimi Ige
    Replies:
    4
    Views:
    1,055
    Juan T. Llibre
    Mar 1, 2005
  2. EricGuan

    change asp1.0 to asp2.0

    EricGuan, Mar 18, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,073
    Steven Cheng[MSFT]
    Mar 18, 2005
  3. aa
    Replies:
    0
    Views:
    415
  4. Jason Chan
    Replies:
    0
    Views:
    653
    Jason Chan
    Dec 3, 2005
  5. Patrick
    Replies:
    6
    Views:
    527
    [MSFT]
    Nov 11, 2004
Loading...

Share This Page