NewBie Question UserControl

Discussion in 'ASP .Net' started by Stan Sainte-Rose, May 9, 2004.

  1. Hi,

    I have a User Control using parameters.
    Into my aspx page I define my parameter values like :
    <My:MC ID="First" Name="Test" Color="red" RunAt="Server"></My:MC>

    I would like to know how can I change the Color value into my .aspx.vb in
    the page_load section
    Thanks

    Stan
     
    Stan Sainte-Rose, May 9, 2004
    #1
    1. Advertising

  2. Hi Stan Sainte-Rose,

    in the page also you need to declare the user control with the same id
    "First" which u have given in the html designer and then in the page's load
    directly acces the property and assign the value.

    //this line goes in the page element's declarations
    Protected First As yourUserControl

    // This line goes in the Page_Load
    First.Color = yourvaluetobeassignedtocontrol

    Regards.
    Ashish M Bhonkiya

    "Stan Sainte-Rose" <> wrote in message
    news:...
    > Hi,
    >
    > I have a User Control using parameters.
    > Into my aspx page I define my parameter values like :
    > <My:MC ID="First" Name="Test" Color="red" RunAt="Server"></My:MC>
    >
    > I would like to know how can I change the Color value into my .aspx.vb in
    > the page_load section
    > Thanks
    >
    > Stan
    >
    >
     
    Ashish M Bhonkiya, May 9, 2004
    #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. huobazi
    Replies:
    1
    Views:
    741
    David Waz...
    Jul 3, 2003
  2. Rajesh Tiwari

    Can we use a usercontrol inside a usercontrol

    Rajesh Tiwari, Aug 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    443
    Rajesh Tiwari
    Aug 12, 2003
  3. nail
    Replies:
    0
    Views:
    1,581
  4. Phl
    Replies:
    2
    Views:
    548
    =?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?=
    Nov 18, 2004
  5. Fabiano
    Replies:
    2
    Views:
    651
    =?Utf-8?B?c3Jpbmk=?=
    Jun 3, 2005
Loading...

Share This Page