-1

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.

2

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.