Reputation: 365
Im having an issue of going back to the previous page. The page i want to go back to had a few radio buttons which you had to select, after this you went to the next page which is the current page which then you can select certain things BUT I want to be able to go back to the previous page and the original selections for that page still be selected.
Anyway i could do this if so how?????
Upvotes: 0
Views: 3086
Reputation: 561
By default in ASP.NET state of controls is stored in ViewState, so it should be the same as user left them.
It is probably some view-state issue.
Go to your codebehind and check PageLoad method. If you are creating or setting radios in PageLoad, you do not want to re-init them every post-back.
if (!IsPostBack){
// your init here
}
Upvotes: 1
Reputation: 11045
You can do a real basic back button with the help of JavaScript.
window.history.go(-1);
which will take you back to the previous page.
Upvotes: 2