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. javascript in asp.net submit button ---- deadline near help plz

javascript in asp.net submit button ---- deadline near help plz

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-netdatabasehelp
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.
  • D Offline
    D Offline
    dream_liner_7e7
    wrote on last edited by
    #1

    i have a asp.net form, i only have to show javascript alert with ok button after submiting the data to database, when user press ok it redirect to my home page. thanks in advance.

    R B 2 Replies Last reply
    0
    • D dream_liner_7e7

      i have a asp.net form, i only have to show javascript alert with ok button after submiting the data to database, when user press ok it redirect to my home page. thanks in advance.

      R Offline
      R Offline
      Ryomin
      wrote on last edited by
      #2

      I'm not sure if this is what you meant but... Button.Attributes["onclick"] = "javascript:return confirm('Thank you for your submittion');"; Make sure you put that code in a place where a post back will occur otherwise the javascript won't get applied to the button onclick event. I'm not sure but you may be able to code that directly in the html source, instead of the code behind. Best of luck,

      Cheers Disgyza Programmer Analyst

      1 Reply Last reply
      0
      • D dream_liner_7e7

        i have a asp.net form, i only have to show javascript alert with ok button after submiting the data to database, when user press ok it redirect to my home page. thanks in advance.

        B Offline
        B Offline
        BalasubramanianK
        wrote on last edited by
        #3

        I am not sure that we can give alert msg after data submitted into database. But It is possible that when submitting the record like "Are you want to save the records". Server side action is happened when you try to insert records into database. Why do you try the client side for that time?

        Balasubramanian K.

        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