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

Clearing variables on reload

Status
Not open for further replies.

Bretto

Technical User
Oct 17, 2001
59
AU
Hi,
I am using vb.net with asp.net and am having problems clearing variables in a text field after i hit reload.

I have tried reassigning the variables etc. but cannot seem to clear the value.

is there anyone who can help or point me in the right direction?
thanks
 
Hi bretto

Are you clearing the fields in a method called by the postback event but initially populating them from your page_load event? If so you may need to use Page.IsPostback to determine when to initialise your controls and when not to.
Code:
If not Page.IsPostback Then
 'Initialise Controls
End If
Apologies if you already have this covered. If this doesnt help try posting some code or giving a clearer idea of what is happening in your app to lead to this point.

Rob

Go placidly amidst the noise and haste, and remember what peace there may be in silence - Erhmann 1927
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top