HyperLink (HYPERLINK)
Role: Responsible for navigating between pages
Property |
value |
function |
NavigateUrl |
Url |
The page address (URL) that will be jumped |
Font-underline |
False |
Get rid of hyperlink underline |
Basic use of Hyperlink controls
Use the most is nothing but NavigateUrl, since is a hyperlink, must have a link address, the following see the specific usage:
Copy Code code as follows:
<%@ Page language= "C #" autoeventwireup= "true" codefile= "HyperLink.aspx.cs" inherits= "Webcontrols_hyperlink"%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title></title>
<body>
<form id= "Form1" runat= "Server" >
<div>
<asp:hyperlink id= "Hlkmenu" runat= "Server" font-strikeout= "False"
Font-underline= "False" navigateurl= "~/webcontrols/checkboxlist.aspx" > check box Group page </asp:HyperLink>
</div>
</form>
</body>
Second, HyperLink NavigateUrl Hyperlink Data binding method
Hyperlink controls often appear in repeater controls, and link addresses are often backed by background data, and are implemented in two ways, as follows:
Copy Code code as follows:
<asp:hyperlink id= "HyperLink1" runat= "server" Navigateurl= ' <%# ' ~/sysmanage/rolemanage/distributerole.aspx? Roleid= "+databinder.eval (Container.DataItem," Roleid ")%> ' > Assigning Permissions </asp:HyperLink>
Copy Code code as follows:
<asp:hyperlink id= "HyperLink1" runat= "Server" imageurl= "Images/hammer_screwdriver.png" navigateurl= "<%#" Eval ( "UserId", "Userinfodetails.aspx?" userid={0} ")%> ' > User Details </asp:HyperLink>