I'm in need of a way to force a postback or page reload in codebehind. Tried using some javascript but didn't get it to work. Browsing the net I see the first question is "why"?
Circumstances are that I have a dropdownlist on autopostback, and the gridview datasource's selectparameter is derived from the selected value of that dropdownlist. So the page works fine normally and the contents are updated whenever the selected item is changed. But some of the links and buttons take the customer off the page so they link back later.
The idea is to store the last choice in a session, and to check on the first page.load event if the session option is other than default. Now I can change the selectedindex of the dropdownlist based on that, but apparently the datasource triggers faster than page.load, so unless I can force a reload, this won't help.
Any ideas? A full page postback / reload isn't the only option of course, just forcing the gridview / datasource to refresh is good enough. I just don't know how to do that other than reloading the whole page.
Thanks.