Is it posible to get a value from a javascript variable and use it into visual basic code without incrusting value on any control.
Share
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 cannot access a js-variable from codebehind without any help of a server-control.
You could redirect the page to itself and pass that value as URL-Parameter(
window.location.href = window.location.href + "?value=test";). But i assume that this is not what you want because it forces a postback.So the best way is to use a hiddenfield:
In javascript function:
On aspx:
In code behind