Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to pass javascript variable value to asp.net page
i want to insert the data from javascript variable to database

Posted
Comments
pradiprenushe 31-Jul-12 4:03am    
What actually you want? you just want to set data & get it on server side. Or you want to do posting data to some other page to handle it? Give some more details.

hi,


You can use hidden field for that. set the hiddenfield value to javascript and access it to server side page.


use this link may help you,

http://stackoverflow.com/questions/331599/using-javascript-to-set-value-of-hidden-field-then-access-value-from-serverside[^]
 
Share this answer
 
You want to know how to talk to server from Javascript.
There are few ways to interact with server side through client side(Javascript):
1. XMLHttpRequest[^]
2. Callback[^]
3. WebService call[^]
4. PageMethod[^]

Pick one that suits you.
 
Share this answer
 
v2

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