Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 16, 2008 12:14 PM by elegantkvc
May 16, 2008 11:26 AM|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 11:38 AM|LINK
May 16, 2008 11:45 AM|LINK
its not working ya.
can you send some other code?
May 16, 2008 12:03 PM|LINK
ok you change like this
then get it in code behind by:
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 12:05 PM|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 12:14 PM|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.