Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi .. I have this code in my .aspx page:

JavaScript
..//Conditions

   $("[id$=tnd1]").val("1st Priority");

//


but it doesn't reflect the string "1 st Priority" when saving to database.

how to save javascript-generated string to database?
Posted
Updated 21-Aug-13 20:38pm
v2
Comments
John-ph 22-Aug-13 2:38am    
what is the value you get on the server side?
macmacmacmac 22-Aug-13 2:44am    
it's empty
walterhevedeich 22-Aug-13 2:45am    
Maybe your JS code has errors, that is why the control was not populated with the value. You can try debuggin your JS code with FireBug if you use Firefox, or other debugging tools for other browsers.
macmacmacmac 22-Aug-13 2:51am    
hmm. the code works fine. the string appears in the textbox but when i save the string inside the textbox, my database doesn't read anything.
Niral Soni 23-Aug-13 7:01am    
How you are saving values to database ? Is it a form submit or AJAX call ?

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