use ViewState

  • Thread starter Thread starter mythcui
  • Start date Start date
M

mythcui

here is a case:
a page has two textboxs and a button, when Page_Load, the two
textboxs was set a value. and when user click the button, if the values
of the two textboxs was not changed, it will show the alert "there is
not any change". How to use the ViewState to do this?
many thanks !
( I'm a new comer of Google Groups, and my English isn't very well,
hope to get help!)
 
mythcui,
this is really an ASP.NET question and should have been posted to the
ASP.NET group.
Normally one would not use ViewState for this purpose. You would have code
to handle the TextChanged event of each TextBox and in this you would have
your logic that determines whether to show an alert. If you want a
client-side alert dialog, you can emit client script such as
Response.Write("<script>alert('" +yourmessage+"');</script>");

Peter
 
Peter 写é“:
mythcui,
this is really an ASP.NET question and should have been posted to the
ASP.NET group.
Normally one would not use ViewState for this purpose. You would have code
to handle the TextChanged event of each TextBox and in this you would have
your logic that determines whether to show an alert. If you want a
client-side alert dialog, you can emit client script such as
Response.Write("<script>alert('" +yourmessage+"');</script>");

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

Thanks, and I have resolved it.~~~
Best Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top