Reputation: 791
i have a user control that i want to build on. right now it just displays a dynamic number. i want to include functionality that will convert the number into a hyperlink that opens a popup window.
label in ascx page:
<asp:Label ID="lbl_num" runat="server" Text="0"></asp:Label>
Upvotes: 0
Views: 409
Reputation: 2258
First of all, you may use the Hyperlink
element instead of Label
. You should add the Target
attribute:
<asp:Hyperlink id="numScore" Target="_new"></asp:Hyperlink>
Anytime, you can change it's value with C#:
numScore.Target = "_blank";
Upvotes: 1