NewBie Question UserControl

  • Thread starter Stan Sainte-Rose
  • Start date
S

Stan Sainte-Rose

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
 
A

Ashish M Bhonkiya

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top