disable viewstate in query string
-
I've written a page that allows a user to look up a page of info from a DB. Nothing too ground breaking there. Now i want to allow the user to email a URL including a querystring specifying which page he was looking at. The querystring contains a massive __ViewState parameter which I can't get rid of. I've set enableviewstate and enableSession state to false in the Page tag and I've set the enableviewstate attribute to false in all the controls i could find that had it set to true but I still haven't got rid of it. My application is going to be entirely stateless so i'm happy to just pass an occassional piece of data from one page to another. Does anyone know how to turn off viewstateentirely? Is there a config setting? Thanks Russell
-
I've written a page that allows a user to look up a page of info from a DB. Nothing too ground breaking there. Now i want to allow the user to email a URL including a querystring specifying which page he was looking at. The querystring contains a massive __ViewState parameter which I can't get rid of. I've set enableviewstate and enableSession state to false in the Page tag and I've set the enableviewstate attribute to false in all the controls i could find that had it set to true but I still haven't got rid of it. My application is going to be entirely stateless so i'm happy to just pass an occassional piece of data from one page to another. Does anyone know how to turn off viewstateentirely? Is there a config setting? Thanks Russell
I am pretty sure the only time viewstate ends up in the query string is when you go cookieless in your webconfig. So if you change your site to allow cookies then the viewstate should get out of your query string. Note even when you turn off viewstate, there is still some viewstate info in the page. Anyway, that is my best guess. Ben
-
I've written a page that allows a user to look up a page of info from a DB. Nothing too ground breaking there. Now i want to allow the user to email a URL including a querystring specifying which page he was looking at. The querystring contains a massive __ViewState parameter which I can't get rid of. I've set enableviewstate and enableSession state to false in the Page tag and I've set the enableviewstate attribute to false in all the controls i could find that had it set to true but I still haven't got rid of it. My application is going to be entirely stateless so i'm happy to just pass an occassional piece of data from one page to another. Does anyone know how to turn off viewstateentirely? Is there a config setting? Thanks Russell
try to use the page directive
EnableViewState="false"
. It should disable the viewstate for the entire page!Just Relax And Keep It Simple.
-
try to use the page directive
EnableViewState="false"
. It should disable the viewstate for the entire page!Just Relax And Keep It Simple.
I,also, assumed that would turn it off for everything on the page but it didn't seem to. Russell