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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I force a page or control to be refreshed?

Status
Not open for further replies.

BlueBlade

Technical User
Joined
Mar 2, 2007
Messages
15
Location
US
Hi I am trying to get my program to respond to changes in the parameters in the URL, specifically a label on the form. The form is my default.aspx form and I have a label on it that I would like to be updated after I change the URL.

This is what I have in the Form Load routine:

Dim Objective As String = Request.QueryString("Objective#")
If Objective = 1 Then
Label1.Text = "This text should show in my label."
End If

I thought that the default page would be reloaded each time I click the hyperlink to update the url but it doesn’t seem to happen.

I use a hyperlink to update the url and I put code in the default.aspx Form Load routine but the code doesn’t seem to be read after clicking the hyperlink. Is there a way that I can get my Label on the form to update by my clicking the hyperlink?

Please help!

Thanks.
 
Is you hyperlink an HTML or server control?
 
You'll have to redirect the user on the click event as the page load event fires before the control's click event.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top