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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.