I wanted to define a HyperLink control in asp.net that produces html output similar to the following:
<a href="#"></a>
but can't figure out how. would be thankful if anyone could help.
Thanks in advance.
The hyperlink is the control to link another page. The hyperlink can navigate to “URL” as well as xaml page. The HyperLink Control is the control to link to another page.
Select an existing control or drag and drop a control from the Visual Studio toolbox onto the design surface. Right-click the control to open the Properties Window. In the Properties Window, set the HyperLink property to mailto: any valid e-mail address.
I agree with SLaks, but here you go
<asp:HyperLink id="hyperlink1" NavigateUrl="#" Text="" runat="server"/>
or you can alter the href using
hyperlink1.NavigateUrl = "#"; hyperlink1.Text = string.empty;
Just write <a href="#"></a>
.
If that's what you want, you don't need a server-side control.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With