Getting variable of the codebehind in the JavaScript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Varun

    #1

    Getting variable of the codebehind in the JavaScript

    I want to access the variable in the codebehind in the javascript
    How can i do that

    Varun
  • Suma

    #2
    RE: Getting variable of the codebehind in the JavaScript

    What is the exact need for referencing a codebehind variable in Javascript
    you can have a control, say hidden textbox that always stores the variable value. Can then access this hidden input type in ur javascript

    Comment

    • Cor

      #3
      Re: Getting variable of the codebehind in the JavaScript

      Hi Varun,

      I would start, as I was you, with the answer from Suma.

      Make a textbox, make it visible = false and enter the text value in your
      page in that using your javascript.

      Than you can get that as the
      textbox.text in your code behind.

      This is not the only possibility but surely the most simple to do.

      Cor




      Comment

      • Varun

        #4
        RE: Getting variable of the codebehind in the JavaScript

        I am assigning some values in the codebehind page and want to manipulate them value in the javascript
        I feel hiddentext field is not a feasible for my problem i already had this idea
        But it is not the feasible way to do as i want to atleast 20 variable of codebehind

        Varun

        Comment

        • Suma

          #5
          RE: Getting variable of the codebehind in the JavaScript


          Maybe RegisterClients criptblock might help you.

          Comment

          Working...