How to execute server side code on browser back button....
-
Hi All, I have an application in asp.net(C#), I've place back button on my web page. On back button i have some sever side code.Problem is, when someone click on browser default back button, I am unable to execute my server side code on browser back button... Please help me on this.... Thanks in advance Yrishi
-
Hi All, I have an application in asp.net(C#), I've place back button on my web page. On back button i have some sever side code.Problem is, when someone click on browser default back button, I am unable to execute my server side code on browser back button... Please help me on this.... Thanks in advance Yrishi
This Happens normally when You click the button more number of times for writing code. Try Like This..! 1)Copy the Code from browser back button 2)go to source view delete the onclick="Button1_Click" html and delete the code of .cs file i.e. browser back button event completely with event.
protected void Button1_Click(object sender, EventArgs e)
{}
3)Now go to button double click on the back button and paste the code..! Hope it may help..!
MyFirstArticlePublished: MenuControlSelectedItem Why Do Some People Forget To Mark as Answer .If It Helps.
-
This Happens normally when You click the button more number of times for writing code. Try Like This..! 1)Copy the Code from browser back button 2)go to source view delete the onclick="Button1_Click" html and delete the code of .cs file i.e. browser back button event completely with event.
protected void Button1_Click(object sender, EventArgs e)
{}
3)Now go to button double click on the back button and paste the code..! Hope it may help..!
MyFirstArticlePublished: MenuControlSelectedItem Why Do Some People Forget To Mark as Answer .If It Helps.
-
Thanks for you reply, sorry but my problem is, browser back button event is client side and i want to execute my server side code on that...
There are quite a few options: 1.) Use the web service. 2.) There is something called PageMethods [^]which you can make use of.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
There are quite a few options: 1.) Use the web service. 2.) There is something called PageMethods [^]which you can make use of.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.