Creating the Site Map Path Control in asp.net
In this application we design the following three pages:
- The
Home Page (Default.aspx)
- The
First Page (myweb1.aspx)
- The Second page (myweb2.aspx)
The source code of the Default.aspx page is as follows:
<html >
<head runat="server">
<title>Aryan Computer, Barshi </title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<p>
<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana"
Font-Size="0.8em" PathSeparator=" : ">
<PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />
<CurrentNodeStyle ForeColor="#333333" />
<NodeStyle Font-Bold="True" ForeColor="#990000" />
<RootNodeStyle Font-Bold="True" ForeColor="#FF8000" />
</asp:SiteMapPath>
</p>
<asp:Label ID="Label1" runat="server"
Text =" I am design the Site Map Path (In Aryan Comptuers) " Font-Bold="True"
Font-Names="Comic Sans MS" Font-Size="Medium" ForeColor="#0066FF"></asp:Label>
<br />
<asp:Label ID="Label2" runat="server" Text="Click Here to see First Page :"
Font-Bold="True"></asp:Label>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/myweb1.aspx">MyWeb1</asp:HyperLink>
<br />
<asp:Label ID="Label3" runat="server" Text="Click Here to see Second Page "></asp:Label>
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/myweb2.aspx">My web
page 2</asp:HyperLink>
</form>
</body>
</html>
The source code of the myweb1.aspx page is as follows:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="myweb1.aspx.cs" Inherits="myweb1" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h4> This is my First Page .....</h4>
</div>
</form>
</body>
</html>
The source code of myweb2.aspx is as follows:
<html>
<head runat="server">
<title>Aryan Computers , Barshi</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h5> This Second page ....</h5>
</div>
</form>
</body>
</html>
Output:
Good Program
ReplyDelete