How to access a javascript object from .js
file in C# code behind file .aspx.cs
file?
var user={name:"john";age:"12"};
I want to access this user object in C# code behind file.
How to access a javascript object from .js
file in C# code behind file .aspx.cs
file?
var user={name:"john";age:"12"};
I want to access this user object in C# code behind file.
There are may ways one is you can pass it in query string. Here is a similar question on SO
Use like
str = $.param({name:"john";age:"12"});
and use this str in parameter.
Save individual value to hidden field and then get it in code behind.