Hi I want to update the hidden field value 'hiddenVal.' using Javascript, [Resolved]

Posted by See29ram under ASP.NET on 1/18/2012 | Points: 10 | Views : 1526 | Status : [Member] | Replies : 1
Hi
I want to update the hidden field value 'hiddenVal.' using Javascript, and then pass it into my code-behind . However, the value in my code-behind always remains the initial value of "0" and never gets updated. Can anyone tell me how to do this please.




Responses

Posted by: Blessyjees on: 1/18/2012 [Member] Bronze | Points: 50

Up
0
Down

Resolved
hi,

try like this in js document.getElementByID("<%=hiddenVal.ClientID %>").value="10". are you using net 4.0 ? if you set clientmode of the hidden control to "static", you can set value in js without using client id like document.getelementById("hiddenVal").value="10";

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

See29ram, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response