Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
hi everyone
i need to access variable javascript to c# as
XML
var myvar = 1500;


           $("<%= RadFileExplorer1.Height=1500 %>");

i want replace 1500 with myvar
thanks for anyhelp
Posted

1 solution

The only way is to place the value in a server control, hidden or not, so it can be read in the code behind.
 
Share this answer
 
Comments
Mostafa Elsadany 11-Apr-12 10:53am    
if i used hidden and add value to hidden on page load from javascript
and execute c# void from javascript i find hidden is null
so i need other way
thanks
[no name] 11-Apr-12 11:12am    
What? I don't undeerstand what you are trying to say.

If you set the value of a hidden server control you should be able to read that value in teh code-behind during a postback. If not, then you are doing something incorrect.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900