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. cross platform feature of asp.net

cross platform feature of asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-netquestion
4 Posts 4 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.
  • S Offline
    S Offline
    ships_agr
    wrote on last edited by
    #1

    i've declared a variable "i" in javascript in aspx file...now i want to retrieve its value in .cs file....also i've to provide the value of "i" from .cs file only.....how can we do it????

    J M T 3 Replies Last reply
    0
    • S ships_agr

      i've declared a variable "i" in javascript in aspx file...now i want to retrieve its value in .cs file....also i've to provide the value of "i" from .cs file only.....how can we do it????

      J Offline
      J Offline
      JHizzle
      wrote on last edited by
      #2

      Could you outline the scenario please? Javascript is client side, C# is server. You -can- pass back the value to the server using a postback or async but C# cannot simply grab a value set in client side javascript.

      1 Reply Last reply
      0
      • S ships_agr

        i've declared a variable "i" in javascript in aspx file...now i want to retrieve its value in .cs file....also i've to provide the value of "i" from .cs file only.....how can we do it????

        M Offline
        M Offline
        MyDevBank
        wrote on last edited by
        #3

        cs on the server .. javascript on the client browser ... declared every asp.net control with an ID that when you postback your page will display the result is this what you are looking for ? mydevbank.com

        1 Reply Last reply
        0
        • S ships_agr

          i've declared a variable "i" in javascript in aspx file...now i want to retrieve its value in .cs file....also i've to provide the value of "i" from .cs file only.....how can we do it????

          T Offline
          T Offline
          T M Gray
          wrote on last edited by
          #4

          Create an ASP:HiddenField control. Set the value of that control in javascript. If you have lots of nested controls you may have to use the <%#yourHiddenCtrlName.ClientID%> trick to get the client side ID to use when setting it in 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