Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set a webcontrol's properties before rendering?

Status
Not open for further replies.

JustBarno

Programmer
Jun 21, 2004
46
0
0
US
I have a web control that has a property of UserId.

I need to set the userid before rendering the control, because based on who is logged in, it displays something different.

If I set the properties in page load for the page the control is placed on, it seems that is post render because the control doesnt work. If I set the UserId in the GUI and compile it, the control works fine, but that obviously isn't acceptable.

Where can I set the properties before the control is rendered, or how can i re-render the control?

Thanks!
 
Do you load the control dynamicaly or it's embedded on the page?
 
try setting the value in the page's prerender event.

but imho, the problem is in the way you designed the web control. take a look there because you might be overriding it's value somewhere.

posting some code might help us get a better idea.

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top