Reputation: 728
I have a label as:
<asp:Label ID="lblwc" runat="server" BackColor="#CCFF66"
BorderColor="#009900" BorderWidth="1px" Font-Italic="True"
Font-Names="Rockwell Condensed" BorderStyle="None" ForeColor="Black">
</asp:Label>
and its .cs defination is:
lblwc.Text = "Thank You for Registration," +" " + name.Text + " | <a href=\"\">login</a> " ;
What i want to do is give link in href="" but the link is not the link to a page but link to a button. Help!!!
Upvotes: 1
Views: 1486
Reputation: 3265
I am not sure I've understood the question but i suppose you want an hyperlink that need to fire a button click event
lblwc.Text = "Thank You for Registration," + " " + name.Text + "<a onclick=\"document.getElementById('myBtnID').click();\">login</a>";
Upvotes: 1
Reputation: 188
Try this solution
<a id="my-link" href="#" onclick="document.getElementById('myButtonId').onclick();">Login</a>
Upvotes: 0