Set lblWelcome.text in default.aspx

georgepatotk

Contributor
Joined
Mar 1, 2004
Messages
432
Location
Malaysia
Attached with the graphic view of my problem. I want the lblWelcome.text to be set to

"Welcome, " & Session.Item("Nick").

The problem is how do I set it within the user control?
Means I click on the Set button in Set.ascx, lblWelcome in default.aspx will be set to "Welcome, " & Session.Item("Nick").
 

Attachments

You use IFrame for "Set.aspx"?
Since you use Session to pass your value,
then in Set.aspx, you just need to assign value to Session,
and when "Set" button press event trigger, you need to use Javascript to force the default.aspx 'refresh', then automatic the lblWelcome will get the latest value from Session
 
I can't remember whether the page_load event in aspx file trigger first or the user control trigger first, it the user control first, then everything will work just fine; otherwise, you need to re-submit again.
 
Back
Top