Reputation: 1794
I have a label in my asp page.
<asp:Label runat="server" style="display: block;" ID="lblRegistrationNo" cssClass="lblUprsregNo"> </asp:Label>
it is populated by a jquery function. but I am unable to get this value on server side.
protected void submit_Click(object sender, EventArgs e)
{
string regNo = lblRegistrationNo.Text;
}
it always returns an empty string.
Upvotes: 1
Views: 657
Reputation: 812
Take a HiddenField with label also. And Set Value of hidden Field same as Label. You can Access hiddenField value in back End.
Upvotes: 1