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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How can I prevent postback in link button

How can I prevent postback in link button

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-netquestion
7 Posts 5 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.
  • P Offline
    P Offline
    Phanindra Kumar
    wrote on last edited by
    #1

    H!, I am using ASP.NET 1.1.I have a link button in my page which opens a popup window when it is clicked. But when i click it it is causing a postback and the popup window is opening. I need to open the popup window without causing the postback. Popup is opening through javascript function which is set to link button's onclick(client) event through linkbutton's attributes. Thanks in Advance

    Phanindra...

    M S K 3 Replies Last reply
    0
    • P Phanindra Kumar

      H!, I am using ASP.NET 1.1.I have a link button in my page which opens a popup window when it is clicked. But when i click it it is causing a postback and the popup window is opening. I need to open the popup window without causing the postback. Popup is opening through javascript function which is set to link button's onclick(client) event through linkbutton's attributes. Thanks in Advance

      Phanindra...

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      maybe.. just use normal A link.

      Thanks and Regards, Michael Sync Blog: http://michaelsync.net

      W 1 Reply Last reply
      0
      • M Michael Sync

        maybe.. just use normal A link.

        Thanks and Regards, Michael Sync Blog: http://michaelsync.net

        W Offline
        W Offline
        wEb GuRu
        wrote on last edited by
        #3

        Just set EnablePostback=False for link button. Or simply use

        Lets work it Out.........!

        S 1 Reply Last reply
        0
        • P Phanindra Kumar

          H!, I am using ASP.NET 1.1.I have a link button in my page which opens a popup window when it is clicked. But when i click it it is causing a postback and the popup window is opening. I need to open the popup window without causing the postback. Popup is opening through javascript function which is set to link button's onclick(client) event through linkbutton's attributes. Thanks in Advance

          Phanindra...

          S Offline
          S Offline
          Sylvester george
          wrote on last edited by
          #4

          Do not use link button, Use hyper link

          Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com

          1 Reply Last reply
          0
          • W wEb GuRu

            Just set EnablePostback=False for link button. Or simply use

            Lets work it Out.........!

            S Offline
            S Offline
            Sylvester george
            wrote on last edited by
            #5

            where is that EnablePostback property ?

            Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com

            1 Reply Last reply
            0
            • P Phanindra Kumar

              H!, I am using ASP.NET 1.1.I have a link button in my page which opens a popup window when it is clicked. But when i click it it is causing a postback and the popup window is opening. I need to open the popup window without causing the postback. Popup is opening through javascript function which is set to link button's onclick(client) event through linkbutton's attributes. Thanks in Advance

              Phanindra...

              K Offline
              K Offline
              K P Kannan
              wrote on last edited by
              #6

              At the end of the javascript function say 'return false' and it won't postback

              S 1 Reply Last reply
              0
              • K K P Kannan

                At the end of the javascript function say 'return false' and it won't postback

                S Offline
                S Offline
                Sylvester george
                wrote on last edited by
                #7

                your suggestion is logically good. But after transfering the control to the popup window you will no be able to execute "return false" statement.

                Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com

                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