Always try to use BasePageand inheritsall of the pages from it, it is good practice, and it helps later on when the project is gradually becoming monster..... and in this case, if you have already done so IT .. one line code...
public abstract class BasePage : Page
{
protected override void OnLoad(EventArgs e)
{
if (this.Form != null)
{
this.Form.Attributes.Add("autocomplete", "off");
}
base.OnLoad(e);
}
}
source
share