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. Passing values in asp.net function from javascript

Passing values in asp.net function from javascript

Scheduled Pinned Locked Moved ASP.NET
helpcsharpjavascriptasp-net
2 Posts 2 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.
  • N Offline
    N Offline
    needhi_p
    wrote on last edited by
    #1

    Hi.. I am having a function getcities()in codebehind. I am writing javascript in aspx page and calling this function from javascript like this... <% getcities(); %> This wrks fine. But now i want to pass parameters in this function. So if i give <% getcities(cityname, statename); %> den it gives error - cityname & statename does not exist in current context. Here i have 2 var cityname & statename. can anyone tell me wat is the problem in this. Thnku in advance...

    A 1 Reply Last reply
    0
    • N needhi_p

      Hi.. I am having a function getcities()in codebehind. I am writing javascript in aspx page and calling this function from javascript like this... <% getcities(); %> This wrks fine. But now i want to pass parameters in this function. So if i give <% getcities(cityname, statename); %> den it gives error - cityname & statename does not exist in current context. Here i have 2 var cityname & statename. can anyone tell me wat is the problem in this. Thnku in advance...

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      When did you call that function ? in any event means some button click or what ?

      Best Regards ----------------- Abhijit Jana Check Out My Latest Article Java.NET : Integration of Java and .NET[^] "Success is Journey it's not a destination"

      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