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. Call Javascript and asp .net click event also

Call Javascript and asp .net click event also

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptquestionannouncement
5 Posts 4 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.
  • A Offline
    A Offline
    AB7771
    wrote on last edited by
    #1

    Hey all, I want to call a javascript function and also the click event that is present in the code behind for an ASP ImageButton. I am using AjaxUpdate Panel and the Click event of the image button is registered for the auto update of the Ajax panel. How do we do that?

    Thanks & Regards, Pramod "Everyone is a genius at least once a year"

    C D 2 Replies Last reply
    0
    • A AB7771

      Hey all, I want to call a javascript function and also the click event that is present in the code behind for an ASP ImageButton. I am using AjaxUpdate Panel and the Click event of the image button is registered for the auto update of the Ajax panel. How do we do that?

      Thanks & Regards, Pramod "Everyone is a genius at least once a year"

      C Offline
      C Offline
      Coding C
      wrote on last edited by
      #2

      Just add javascript to the onlclientclick event of the imagebutton and make sure to return true from javascript.

      Coding C# ExciteTemplate

      A 1 Reply Last reply
      0
      • C Coding C

        Just add javascript to the onlclientclick event of the imagebutton and make sure to return true from javascript.

        Coding C# ExciteTemplate

        A Offline
        A Offline
        AB7771
        wrote on last edited by
        #3

        have done that but it gives compilation error...

        Thanks & Regards, Pramod "Everyone is a genius at least once a year"

        A 1 Reply Last reply
        0
        • A AB7771

          have done that but it gives compilation error...

          Thanks & Regards, Pramod "Everyone is a genius at least once a year"

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          AB7771 wrote:

          ut it gives compilation error...

          So, you are expecting we will guess what error you are getting ? :doh: Please Provide the proper/details information to get the correct answer. :)

          Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

          1 Reply Last reply
          0
          • A AB7771

            Hey all, I want to call a javascript function and also the click event that is present in the code behind for an ASP ImageButton. I am using AjaxUpdate Panel and the Click event of the image button is registered for the auto update of the Ajax panel. How do we do that?

            Thanks & Regards, Pramod "Everyone is a genius at least once a year"

            D Offline
            D Offline
            dotnetBeginer
            wrote on last edited by
            #5

            maybe you can do it like this In Page_Load event ImageButton1.Attributes.Add("onclick", "javascript:alert('yes')");

            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