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. "use javascript"

"use javascript"

Scheduled Pinned Locked Moved ASP.NET
javajavascriptsysadmintools
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.
  • R Offline
    R Offline
    ravikiranreddydharmannagari
    wrote on last edited by
    #1

    iam having button(server control) once i clik it should excute java script function and server side code i need syntax plz

    A M 2 Replies Last reply
    0
    • R ravikiranreddydharmannagari

      iam having button(server control) once i clik it should excute java script function and server side code i need syntax plz

      A Offline
      A Offline
      Akhilesh Yadav
      wrote on last edited by
      #2

      write javascript function on "OnClick" event of button. once done with function return true, this will take page posted to server and server code will get executed.

      Regards, Akhilesh Yadav

      1 Reply Last reply
      0
      • R ravikiranreddydharmannagari

        iam having button(server control) once i clik it should excute java script function and server side code i need syntax plz

        M Offline
        M Offline
        Meena T Shivaram
        wrote on last edited by
        #3

        hi, If you want to run the javascript and the server side code with a single button click event,then, you can do as follows: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Response.Write("Postback: This is a server-side event ") End Sub function AlertHello(){ alert("Hello ..This is a client side Java script") } and add this line: So, when you click the Button, both the events are triggered... hope this helps..

        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