Click here to Skip to main content
15,913,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

on click of broswer back button values is getting filled into textboxes of previous page,when he clicks browser back button it should display fresh page.

i tried to set enableviewsate="false"; it does not work,both for controls and content place holder.
i also tried with Response.Cache.SetCacheability(HttpCacheability.NoCache); and response.cache.setnostore();both wont work.
is there any way to check if he has clicked back button or he is redirecting form other page and i will write response.redirect("page.aspx");


thanks in advance.
Posted

Hi
Try this way. Create a method in your code behind which will clear all the field values. You can detect back clicked or not through javascript( with the help of eventcode I am not so sure about the keywords).

Best Regards,
Sriman
 
Share this answer
 
Comments
girish sp 21-Oct-11 2:21am    
when they click back button all the events will happen in the page,so do validation ,so the textbox cant be empty..i want to avoid validation part when he clicks browser back button..
Hi,
Please clear all the fields after geting saved.
regards,
Shefeek
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900