In my previous post, I described the steps to set up a form to use the HTTP GET method.
I failed to mention that this method also works for forms embedded in a MasterPage.
I showed how to clear the hidden variables, such as __VIEWSTATE, with a line of Javascript code.
However, it turns out that the presence of the __VIEWSTATE parameter in the URL defines how ASP.Net treats the other URL parameters.
If the URL contains a __VIEWSTATE parameter (even if its value is empty), ASP.Net binds the values in the URL to the controls in the form.
If it does not, you have to parse the Request parameter collection manually. To get the parameter name corresponding to a control, you need to calculate
myControl.ClientID.Replace(“_”, “%24″)