"Form controls, such as TextBox and RadioButtonList, retain their values
between posts even when view state is disabled. The values of these
controls do not need to be preserved in the _VIEWSTATE hidden form field
becuase they are actually being submitted to the server on each form
post." - ASP.NET Unleashed
Sounds like to me the Textbox value is getting submitted to the server
automatically during post while the button text is discarded. Viewstate
isn't really involved here, since these values are being changed client
side. I only quoted that because it seems relevant in the description of
how a textbox is "different".
HTH,
Greg
"Marcus" <ma********@m2software.co.uk> wrote in message
news:a4**************************@posting.google.c om...
Hi,
I have a strange problem here... I have a simple onclick event on an
ASP.NET button that does the following Javascript...
document.getElementById("Button1").text = "Cancelled";
However, when I inspect the Button1.text value from code behind the it
shows the original value of Button1 and not what the Javascript has
changed it to. The funny thing is that it works for an ASP.NET text
box, as follows:-
document.getElementById("TextBox1").value = "Marcus123";
Any help appreciated....
Marcus.