C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
ASP.NET Web Forms HyperLinkIt is a control that is used to create a hyperlink. It responds to a click event. We can use it to refer any web page on the server. To create HyperLink either we can write code or use the drag and drop facility of visual studio IDE. This control is listed in the toolbox. This is a server side control and ASP.NET provides own tag to create it. The example is given below. < asp:HyperLinkID="HyperLink1" runat="server" Text="JavaTpoint" NavigateUrl="www.TheDeveloperBlog.com" ></asp:HyperLink> Server renders it as the HTML control and produces the following code to the browser. <a id="HyperLink1" href="www.TheDeveloperBlog.com">JavaTpoint</a> This control has its own properties that are tabled below.
Example// user-form.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="user-form.aspx.cs" Inherits="asp.netexample.user_form" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:HyperLink ID="HyperLink1" runat="server" Text="JavaTpoint" NavigateUrl="www.TheDeveloperBlog.com"></asp:HyperLink> </div> </form> </body> </html> This property window shows properties for the HyperLink control. Output: This link redirects to TheDeveloperBlog home page.
Next TopicASP.NET RadioButton
|