How is it possible to make a button go back to the previous page, rather than redirecting it to the actual htm page (loses all the info put in input fields)
However, if you're page has been "refreshing" via numerous postbacks then you'd actually need to use:
"history.go(-x)"
(which will enable your page to truly back up to the previous page rather than backing thru all the postbacks)
where "x" is a counter you maintain in your codebehind based on how many times you've done postbacks (need to store the value between postbacks in ViewState or something). In this type of situation you'd probably want your button to be setup to runat=server so you could dynamically create the javascript "onclick" event to include the "back count".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.