Is it possible to set value of property defined at C# to javascript…
c# Code.
public int val { get; set; }
Now i want to set val property at java script function
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could do a
<% Response.Write( val )%>, or<%= val %>in the .aspx page if you wanted something quick and dirty.Edit
If you want to go the reverse. No, it’s not really possible. You might look into WebMethods, but that’s not directly what you want to do.