How to use ViewState in JavaScript?

Tripati_tutu
Posted by Tripati_tutu under JavaScript category on | Points: 40 | Views : 6897
To use ViewState in JavaScript, use
<form id="fd1" runat="server" name="DisplayForm" method="show" action="MyDefaultPage.aspx">
<input id="hiddenValue" runat="server" type="hidden" />
</form>

<script type="text/javascript">
fd1.hiddenValue.value = "Here some value"; //or set the value accordingto the requirement
</script>

Comments or Responses

Login to post response