Saturday, June 28, 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);
}

1 comment :

  1. Thankx it worked for me.

    thanks a lot

    ReplyDelete

AJAX, asp, Asp.net, asp.net and sql server security, Asp.net IntemIndex, C#, Css, DataBinder.Eval, DataKeyNames, Datalist, Datapager, DataSet, DataTable, DropDownList, FindControl, gridview, JavaScript, jquery, Listview, Paging, Regex, RegularExpression, Repeater, Server side validation, Sql Server, timer, timercallback, Validation, XML, xmlnode, XPath