without postback i want to get client side value.

Posted by Gopinath under ASP.NET on 8/18/2012 | Points: 10 | Views : 2212 | Status : [Member] | Replies : 1
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.



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

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;

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


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

Login to post response