Click here to Skip to main content
15,897,334 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to pass values from Java script to Code behind function
something like this
var Values=<%=getdetails(%>Param1<%,%>Param2<%)%>;

it is possible ?
if not then please suggest me some other solution ...
Posted

You can use Page Methods. Just make that function WebMethod and use that in Javascript.
 
Share this answer
 

ASP.NET Web API can be a good solution.


See also this CP article: Introduction to ASP.NET Web API.

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900