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. show message box in asp.net(c#)

show message box in asp.net(c#)

Scheduled Pinned Locked Moved ASP.NET
csharphelpquestionasp-net
3 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.
  • P Offline
    P Offline
    ptvce
    wrote on last edited by
    #1

    thanks for ur help i write this [confirm("message")] insted of [confirm('message') means " insted of ' and showed error. now thats right thanks. one question: i should write delete command after this syntax means after btnDelete.attributes.add("onclick",javascriptreturn confirm('message')"; ??????? ur mean is if i click ok the recorde be delete and if i click cancel record dont be delete????????

    A D 2 Replies Last reply
    0
    • P ptvce

      thanks for ur help i write this [confirm("message")] insted of [confirm('message') means " insted of ' and showed error. now thats right thanks. one question: i should write delete command after this syntax means after btnDelete.attributes.add("onclick",javascriptreturn confirm('message')"; ??????? ur mean is if i click ok the recorde be delete and if i click cancel record dont be delete????????

      A Offline
      A Offline
      abcxyz82
      wrote on last edited by
      #2

      Both works ' and ", you can use either. Javascript is tricky, it might be another error. Here's the sample code showing how to use it, function closeWindow() { if (confirm('Are you sure you want to cancel ')) { alert("yes clicked"); } else { alert("no clicked"); } } Regards, MaulikCE

      1 Reply Last reply
      0
      • P ptvce

        thanks for ur help i write this [confirm("message")] insted of [confirm('message') means " insted of ' and showed error. now thats right thanks. one question: i should write delete command after this syntax means after btnDelete.attributes.add("onclick",javascriptreturn confirm('message')"; ??????? ur mean is if i click ok the recorde be delete and if i click cancel record dont be delete????????

        D Offline
        D Offline
        Daniel Santillanes
        wrote on last edited by
        #3

        Yes. If you click Ok, the page will post to the server and call the button's event. Clicking cancel will avoid posting to the server. You can simply write: button.Attributes.Add("onclick","return confirm('Delete?');"); daniero

        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