In asp.net, buttons can have postback urls (ie by specifying a PostBackUrl – I have used this to truncate querystring parameters in the past – by just specifying the page url without any parameters). This is super easy with a button.
Does anyone know what the best approach to doing this is with a dropdownlist? If I specify AutoPostBack (post back when the selection changes), there doesn’t seem to be an easy way to modify the postback url (ie postback to the page without querystring parameters).
I’m guessing maybe doing a custom postback with javascript… but is there a better method – like a property as in the asp.net button that I am missing?
No there isn’t property with DropDownList. You can redirect the user using
Response.Redirectmethod and useSession collectionto persists data between requests.