Friday, 27 June 2008

Get web control value through javascript

<asp:TextBox id="txtname" runat=server ></asp:TextBox>
<script>

function getvalue()
{
  var val=document.getElementById('<%=txtname.ClientID%>').value;
  alert(val);
}
Share:

1 comment: