Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to execute server side code on browser back button....

How to execute server side code on browser back button....

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-netsysadmintutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yrishi
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • Y 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

      S Offline
      S Offline
      sashidhar
      wrote on last edited by
      #2

      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.

      Y 1 Reply Last reply
      0
      • S sashidhar

        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.

        Y Offline
        Y Offline
        yrishi
        wrote on last edited by
        #3

        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...

        M 1 Reply Last reply
        0
        • Y yrishi

          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...

          M Offline
          M Offline
          Manas Bhardwaj
          wrote on last edited by
          #4

          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.

          Y 1 Reply Last reply
          0
          • M Manas Bhardwaj

            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.

            Y Offline
            Y Offline
            yrishi
            wrote on last edited by
            #5

            Thanks for your reply...ok. I'll check it.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups