without postback i want to get client side value.

Posted by Gopinath under ASP.NET on 8/18/2012 | Points: 10 | Views : 2122 | Status : [Member] | Replies : 1
Hi,
My requirement is,
step1:By default I have hidden field value as "rep";
Step2: When i click a button i have change the value in hiddenfield.
Step3: without postback i want to get hidden field value in server side.
reply ASAP.

C.Gopinath


Responses

Posted by: Rambabu123 on: 8/21/2012 [Member] Starter | Points: 25

Up
0
Down
I think this is useful for you
<head runat="server">
<title></title>//here implement that that function
<script type="text/javascript" language="javascript">
function assignvalue() {
document.getElementById('<%=hiddenvalue.ClientId %>').value = "rep"; //here assign vaue to hiddenfield & Access that vaue in codebhehind
return false;
}

</script>
</head>
<body>
<form id="form1" runat="server">
<asp:HiddenField ID="hiddenvalue" runat="server" />
<div>
<asp:Button ID="btntest" runat="server" OnClientClick="assignvalue()" />//Here write a client side function

</div>
</form>
</body>

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

Login to post response