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 prevent Asp.net page postback when we click on MasterPage button in Content page

How to prevent Asp.net page postback when we click on MasterPage button in Content page

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorialquestion
2 Posts 2 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.
  • R Offline
    R Offline
    Raheem MA
    wrote on last edited by
    #1

    Hello All, We have a scenario for exporting some data to Excel when the user clicks on Export to Excel button. We have "Export to Excel" button on Master page. Anybody has idea to stop page postback on Export button click? Can you please shed some light on this? Thank you in advance, Raheem MA

    C 1 Reply Last reply
    0
    • R Raheem MA

      Hello All, We have a scenario for exporting some data to Excel when the user clicks on Export to Excel button. We have "Export to Excel" button on Master page. Anybody has idea to stop page postback on Export button click? Can you please shed some light on this? Thank you in advance, Raheem MA

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

      You can set the following property of your asp button: OnClientClick="return false;"
      Example: <asp:Button ID="btnID" runat="server" Text="ButtonLabel" OnClientClick="return false;" />

      Greetings Covean

      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