Last post May 16, 2008 08:14 AM by elegantkvc
May 16, 2008 07:26 AM|chandran.devi|LINK
I am trying to assign a value to a hidden field by using the following code but its not working.So can anyone give some better suggestion.
<body onload="BLOCKED SCRIPThidval(this.form,<%=value%>)">
<input type="hidden" name="hidden1" value="">
/// In the code Behind I am calling the hidden value as follows
dim var = request.form("hidden1")
but the above code is not working so please help me to solve this issue.
May 16, 2008 07:38 AM|rajakec|LINK
May 16, 2008 07:45 AM|chandran.devi|LINK
its not working ya.
can you send some other code?
May 16, 2008 08:03 AM|rajakec|LINK
ok you change like this
then get it in code behind by:
May 16, 2008 08:03 AM|lallouna85|LINK
why you don't try the hidden field as runat="server"
and then var hidden = document.getElementById('<%= myHiden.ClientID %>');
if(hidden != null)
hidden.value = "1"
May 16, 2008 08:05 AM|lallouna85|LINK
your code rajakec will not work , you can't call the id straight forward if you put the control as runat="server" I disagree with you.
May 16, 2008 08:14 AM|elegantkvc|LINK
You can use document.getElementById('HiddenField's CLientId').value to acheive ur task.
1.Hiddenfiled must have attribute runat="server"
2.By clicking view source on the output browser window you can identify the client Id for your hidden field.