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. asp.net /javascript

asp.net /javascript

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-netdata-structurestutorial
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.
  • K Offline
    K Offline
    kirthikirthi
    wrote on last edited by
    #1

    HI Is it posible to call asp.net function in javascript Example - i have a javascript function in that i want to call the asp.net values var customarray=new Array('in this i want to call asp.net values' ); var custom2 = new Array('something','randomly','different'); Than Q Keerthi

    M M 2 Replies Last reply
    0
    • K kirthikirthi

      HI Is it posible to call asp.net function in javascript Example - i have a javascript function in that i want to call the asp.net values var customarray=new Array('in this i want to call asp.net values' ); var custom2 = new Array('something','randomly','different'); Than Q Keerthi

      M Offline
      M Offline
      manowj
      wrote on last edited by
      #2

      Hi, Using Ajax techniques(XMLHTTP) call back function you can execute ASP.NET functions.

      Regards, Manowj

      1 Reply Last reply
      0
      • K kirthikirthi

        HI Is it posible to call asp.net function in javascript Example - i have a javascript function in that i want to call the asp.net values var customarray=new Array('in this i want to call asp.net values' ); var custom2 = new Array('something','randomly','different'); Than Q Keerthi

        M Offline
        M Offline
        Manikandan net
        wrote on last edited by
        #3

        Yes you can do this I assume that u have a method in code behind which returns string, write a logic to return string in following format Vaue1, value2, value3 SERVER Method(code behind): public string GetCommaSepratedUserNames() { //write u r logic here, instead of my sample return "'Manikandan.net, Prem.telecom, someName.Asp'"; } Here value1, value2, value3 are your desired values, which u want to return from server. Write the java script like bellow: <script> var customarray=new Array(<%=GetCommaSepratedUserNames()%>; var custom2 = new Array('something','randomly','different'); </script>

        Manikandan.net [Coding is life]

        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