10 weber Posted November 26, 2010 Share Posted November 26, 2010 I wrote enableviewstate="false" in a <form> tag, but FF doesn't restart the form's data on postback (e.g. the <input type="checkbox" checked="checked" /> doesn't get checked back after 'unchecking' it and restarting the page).? Link to comment Share on other sites More sharing options...
Ingolme Posted November 26, 2010 Share Posted November 26, 2010 I don't think "enableviewstate" is actually a valid attribute. It's probably proprietary to whichever browser it works in. Link to comment Share on other sites More sharing options...
10 weber Posted November 26, 2010 Author Share Posted November 26, 2010 I don't think "enableviewstate" is actually a valid attribute. It's probably proprietary to whichever browser it works in.What can I use, then? Link to comment Share on other sites More sharing options...
Ingolme Posted November 26, 2010 Share Posted November 26, 2010 When you reload a page, firefox tends to keep the information just in case you didn't want to lose it. I suppose that can be changed somewhere in the browser settings. You can try to detect if it's checked when the page loads, using Javascript. Link to comment Share on other sites More sharing options...
10 weber Posted November 26, 2010 Author Share Posted November 26, 2010 When you reload a page, firefox tends to keep the information just in case you didn't want to lose it. I suppose that can be changed somewhere in the browser settings. You can try to detect if it's checked when the page loads, using Javascript.I prefer not to ask users to change their settings, and using JS will significantly increase loading time (the page contains hundreds of inputs). Are you sure there's nothing to change that? Link to comment Share on other sites More sharing options...
Ingolme Posted November 26, 2010 Share Posted November 26, 2010 Not as far as I know. Plain HTML can't do anything about that. Link to comment Share on other sites More sharing options...
dink Posted November 26, 2010 Share Posted November 26, 2010 It is possible using a high level language such as VB, C++, C# Sub Page_Load(sender As Object, e As System.EventArgs) DataBind() ' Set EnableViewState to false to disable saving of view state ' information. myControl.EnableViewState = False If Not IsPostBack Then display.Enabled = False End If End Sub EnableViewStateHope this helps some.dink Link to comment Share on other sites More sharing options...
Ingolme Posted November 26, 2010 Share Posted November 26, 2010 But a solution of that sort would only work for Internet Explorer and would require each client installing some kind of extension. Link to comment Share on other sites More sharing options...
jeffman Posted November 26, 2010 Share Posted November 26, 2010 As far as I can tell, the whole thing must be executed on an ASP.NET server. I'm not sure what the outputted HTML looks like. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.