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. call function from jscript file to .aspx inline code

call function from jscript file to .aspx inline code

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

    for validation: I want to call a function which is in .js file, function called in inline code by is it correct way to call ???? or any one tell me the write way to call function from javascript file i already done following code runnable for keypress event, Please tell me the way to call function in aspx inline code or any fault in given code

    N S 2 Replies Last reply
    0
    • G g_amol

      for validation: I want to call a function which is in .js file, function called in inline code by is it correct way to call ???? or any one tell me the write way to call function from javascript file i already done following code runnable for keypress event, Please tell me the way to call function in aspx inline code or any fault in given code

      N Offline
      N Offline
      ncsubbu
      wrote on last edited by
      #2

      use TextBox1.Attribute.add("onkeypress","javascript:f1()") in

      1 Reply Last reply
      0
      • G g_amol

        for validation: I want to call a function which is in .js file, function called in inline code by is it correct way to call ???? or any one tell me the write way to call function from javascript file i already done following code runnable for keypress event, Please tell me the way to call function in aspx inline code or any fault in given code

        S Offline
        S Offline
        Sandeep Akhare
        wrote on last edited by
        #3

        There are manu ways to call the javascript funtion from aspx and code behind file Write you javascript function and call it from on that event <asp:TextBox ID="TextBox1" onkeypress="myfunction();" runat="server"></asp:TextBox> in same you can register the same from code behind file also TextBox1.Attributes.Add("onkeypress", "javascript:myfunction();");

        Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... " Check My Blog

        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