Reputation: 1674
I am having problem to get asp server element
data.
Here is my textbox
for usercode.
and the script where i want to get its valu. but its not working.
please help me in this.
thnx in advance.
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div>
<asp:TextBox ID="txtUserCode" runat="server" Width="78%" Height="35%"></asp:TextBox>
</div>
</asp:Content>
<script type="text/javascript">
$(document).ready(function ()
{
$("input[type='text']").change(function ()
{
var textBox = document.getElementById('<%= txtUserCode.ClientID %>');
alert(textBox);
});
});
</script>
Upvotes: 0
Views: 171