and <asp:Label> generates a <span> tag, so it would be $("#lbl").text(); or if there is HTML involved, $("#lbl").html();
That is as long as your label isn't inside a naming container (MasterPage, GridView, UserControl, Wizard, etc) where the ID of the label gets changed On Jan 20, 7:23 am, vivek <chauhanvive...@gmail.com> wrote: > How can i get the value of label using jQuery. > > i use the following code > > $(document).ready(function() { > alert($("#lbl").val()); > > }); > > in the body tag i place the <asp:Label runat="server" ID="lbl" > Text="mainone" ></asp:Label> > > i am unable to get the "mainone" in the alert message. > > where i m wrong?. > > Appreciate any help > > Happy Coding :)