Reputation: 2069
I need to use a javascript variable value in server side.
Example:
JavaScript
var result = false;
CS Code
if(result)
{
Console.Write("Welcome..")
}
else
{
Console.Write("plz try again..")
}
Note
I don't want to post a hidden field.
Upvotes: 0
Views: 246
Reputation: 944320
With each request, any server side code will run and then any client side code will run. You can't switch between them at will.
Your options are:
Remember to build on things that work.
Upvotes: 2