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 call code behind function in javascript ? [modified]

how to call code behind function in javascript ? [modified]

Scheduled Pinned Locked Moved ASP.NET
questionjavascriptdatabasesysadmin
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.
  • U Offline
    U Offline
    unil Dhiman
    wrote on last edited by
    #1

    Hi All, I have a button on page. when user click this button it will call a server side function, which check some data in database. then there will be confirmation message like "Record already exist, Do you want to continue?". if user click (OK)Yes then it will process further in database using another server side function. otherwise it will not process further. Please tell me how can I do this using javascript ? I need to show confirmation message. Thanks. Regards, Sunil

    modified on Monday, September 8, 2008 4:27 AM

    B H 2 Replies Last reply
    0
    • U unil Dhiman

      Hi All, I have a button on page. when user click this button it will call a server side function, which check some data in database. then there will be confirmation message like "Record already exist, Do you want to continue?". if user click (OK)Yes then it will process further in database using another server side function. otherwise it will not process further. Please tell me how can I do this using javascript ? I need to show confirmation message. Thanks. Regards, Sunil

      modified on Monday, September 8, 2008 4:27 AM

      B Offline
      B Offline
      balaji t
      wrote on last edited by
      #2

      hi, give this code in the button click event onclientclick = "return confirm('Record already ....continue?);" it will popup a window asking confirmation if u click yes then 1ly it will invoke server side validation if u click no it will b in the same page and no event will get fired.

      T.Balaji

      1 Reply Last reply
      0
      • U unil Dhiman

        Hi All, I have a button on page. when user click this button it will call a server side function, which check some data in database. then there will be confirmation message like "Record already exist, Do you want to continue?". if user click (OK)Yes then it will process further in database using another server side function. otherwise it will not process further. Please tell me how can I do this using javascript ? I need to show confirmation message. Thanks. Regards, Sunil

        modified on Monday, September 8, 2008 4:27 AM

        H Offline
        H Offline
        hemant kaushal
        wrote on last edited by
        #3

        You can use ajax to call server side function by javascript.

        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