As I command to call a function of javascript from asp.net, I already did it of different forms, but it marks to me undefined, empty field, or it did not mark to me nothing and as far as I respect the form to do it is thus. / p>
Code to obtain value from a textbox.
var nick = $('#<%=txtNick.ClientID%>').text();
alert(nick);
var nick = $('#<%=txtNick.ClientID%>').val();
alert(nick);
var nick = document.getElementById("<%= txtNick.ClientID %>").value;
Textbox code:
<asp:TextBox ID="txtNick"
runat="server"></asp:TextBox>
Button code that should activate the function.
<asp:Button ID="btnEntrar" runat="server" Text="Entrar" OnClientClick="return autenticarme();" />