lunargirrl
Programmer
How can I clear the controls of a page (labels, textboxes, etc..) when the back and forward buttons of the browser are pressed??
Thanks a lot,
Gis.
Thanks a lot,
Gis.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
foreach(System.Web.UI.Control c in this.Page.Controls)
{
if(c.GetType() == typeof(Label))
((Label)c).Text = String.Empty;
if(c.GetType() == typeof(TextBox))
((TextBox)c).Text = String.Empty;
if(c.GetType() == typeof(DropDownList))
((DropDownList)c).Items.Clear();
}