If you set the value of the Textbox programmatically, then when the Page
Loads it sets it to that value. When you submit it will keep doing it unless
you include some code to tell it to do it on initial load like this:
private Page_Load
{
if(!IsPostBack)
{
txt1.Text = "Hi";
}
}
Not sure of syntax for VB:)
The IsPostBack property of the Page class detects when the request is a
postback. That is it has been submitted after initial load.
Hope this helps,
Frank
"VB Programmer" <Do*****************@jEmail.com> wrote in message
news:Oi**************@TK2MSFTNGP15.phx.gbl...
I have a textbox on my webform. I can set it, like txt1.text = "hi", but
if I change the text and click a button to display the current value it
RETAINS the old value. Any ideas?
Any ideas?