Getting variable of the codebehind in the JavaScript

G

Guest

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

Varun
 
G

Guest

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
 
C

Cor

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top