by Emmaneale Mendu, Web Developer
The HyperLinke Server Control enables you to programmatically work with any hyperlinks on your Web pages. Hyperlinks are used to transfer users to one page to another.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>HyperLink Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:HyperLink runat="server" Text="Go to Default Page" NavigateUrl="~/Default.aspx"></asp:HyperLink>
<p>
<%-- You Can Add Image to your HyperLink --%>
<asp:HyperLink ID="HyperLink1" ImageUrl="~/desibindaas.jpg" NavigateUrl="~/Default.aspx"
runat="server"></asp:HyperLink>
</p>
</div>
</form>
</body>
</html>
No comments:
Post a Comment