Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > NewBie Question UserControl

Reply
Thread Tools

NewBie Question UserControl

 
 
Stan Sainte-Rose
Guest
Posts: n/a
 
      05-09-2004
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


 
Reply With Quote
 
 
 
 
Ashish M Bhonkiya
Guest
Posts: n/a
 
      05-09-2004
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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting a property of a control inside a usercontrol, from another usercontrol Fabiano ASP .Net 2 06-03-2005 09:56 AM
accessing usercontrol from another usercontrol Phl ASP .Net 2 11-18-2004 07:33 PM
Access a control inside an usercontrol from another control inside another usercontrol nail ASP .Net 0 09-15-2004 03:55 PM
Can we use a usercontrol inside a usercontrol Rajesh Tiwari ASP .Net 0 08-12-2003 03:56 PM
Use LoadControl to load a usercontrol but the webcontrol in the usercontrol can not AutoPostBack huobazi ASP .Net 1 07-03-2003 03:14 AM



Advertisments