SlideShare a Scribd company logo
Unit 05:
Webform1.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb"
Inherits="WebApplication2.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title> Calendar VisibleMonthChanged Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3> Calendar VisibleMonthChanged Example </h3>
Select a different month on the calendar.
<br /><br />
<asp:Calendar id="Calendar1" runat="server"
OnVisibleMonthChanged="MonthChange">
<WeekendDayStyle BackColor="gray">
</WeekendDayStyle>
</asp:Calendar>
<hr />
<table border="1">
<tr style="background-color:Silver">
<th>
Month navigation direction
</th>
</tr>
<tr>
<td>
<asp:Label id="Message"
Text="Starting Month."
runat="server"/>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Webform1.aspx.vb
Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
End Sub
Sub MonthChange(sender As Object, e As MonthChangedEventArgs)
If e.NewDate.Month > e.PreviousDate.Month Then
Message.Text = "You moved forward one month."
Else
Message.Text = "You moved backwards one month."
End If
End Sub
End Class
Asp.docx(.net --3 year) programming
Program 02:
Using the Validation Controls
Webform2.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb"
Inherits="WebApplication2.WebForm2" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title><h1>Using the Validation Control</h1></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server"
Text="RequiredField Validator Control Example" Font-Bold="True"
Font-Size="Medium" Font-Underline="True"></asp:Label>
<br />
<br />
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Small"
Text="User name:"></asp:Label>
&nbsp;&nbsp;
<asp:TextBox ID="TextBox1" runat="server" Height="22px"
Width="175px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="User name can not be
empty"></asp:RequiredFieldValidator>
<br />
<br />
<asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="Small"
Text="Password:"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox2" runat="server" Height="22px" TextMode="Password"
Width="175px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="TextBox2" ErrorMessage="Password can not be
empty"></asp:RequiredFieldValidator>
<br />
<br />
Age:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox
ID="TextBox3" runat="server" ViewStateMode="Disabled" Width="175px"></asp:TextBox>
<asp:RangeValidator runat="server" id="rngDate" controltovalidate="TextBox3"
minimumvalue="20" maximumvalue="30" errormessage="Please enter the age between 20 to 30"
/>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button1" runat="server" BackColor="Black" Font-Bold="True"
Font-Size="Medium" ForeColor="White" Text="Submit" />
</div>
</form>
</body>
</html>
Webform2.aspx.vb
Public Class WebForm2
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
End Sub
End Class
Program 03:
Designing Websites with Master Pages
Webform2.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"MasterPa
geFile="~/MasterPage.master" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
Master.master
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Master Page with Menu control in asp.net with example</title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.parent_menu
{
width: 110px;
background-color: #8AE0F2;
color: #000;
text-align: center;
height: 30px;
margin-right: 5px;
}
.child_menu
{
width: 110px;
background-color: #000;
color: #fff;
text-align: center;
height: 30px;
line-height: 30px;
}
.sub_menu
{
width: 110px;
background-color: #000;
color: #fff;
text-align: center;
height: 30px;
line-height: 30px;
margin-top: 5px;
}
.selected_menu
{
background-color: #FF6600;
}
.hover_menu
{
background-color: #990000;
color:#fff;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" />
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1"Orientation="Horizontal">
<LevelMenuItemStyles>
<asp:MenuItemStyle CssClass="parent_menu" />
</LevelMenuItemStyles>
<LevelSelectedStyles>
<asp:MenuItemStyle CssClass="child_menu" />
</LevelSelectedStyles>
<DynamicMenuItemStyle CssClass="sub_menu" />
<DynamicHoverStyle CssClass="hover_menu" />
<StaticSelectedStyle CssClass="selected_menu" />
<StaticHoverStyle CssClass="hover_menu" />
</asp:Menu>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
SiteMap
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="" description="">
<siteMapNode url="Default.aspx" title="Home" description="Home Page"/>
<siteMapNode url="Forums.aspx" title="Forums" description="Forums Page"/>
<siteMapNode url="Careers.aspx" title="Careers" description="Careers Page" >
<siteMapNode url="Jobs.aspx" title="Jobs" description="Jobs Page" />
<siteMapNode url="upload.aspx" title="Upload" description="Upload Page" />
</siteMapNode>
<siteMapNode url="ContactUs.aspx" title="Contact US" description="ContacUs Page" />
</siteMapNode>
</siteMap>
Asp.docx(.net --3 year) programming

More Related Content

What's hot (20)

PPT
An Introduction to Ajax Programming
hchen1
 
PPTX
Java script Advance
Jaya Kumari
 
PPT
ASP.NET 12 - State Management
Randy Connolly
 
DOCX
Copy of ajax tutorial
Abhishek Kesharwani
 
PPTX
Introduction to ajax
Raja V
 
PPTX
Introduction about-ajax-framework
Sakthi Bro
 
DOCX
Web Scripting Project JavaScripts and HTML WebPage
Sunny U Okoro
 
PPT
Vb.Net Web Forms
Dutch Dasanaike {LION}
 
PPT
Session vii(java scriptbasics)
Shrijan Tiwari
 
PPTX
Internet and Web Technology (CLASS-6) [BOM]
Ayes Chinmay
 
PDF
Getting Started with JavaScript
Kevin Hoyt
 
PPTX
Asp PPT (.NET )
Ankit Gupta
 
PDF
22 j query1
Fajar Baskoro
 
PDF
ajax_pdf
tutorialsruby
 
An Introduction to Ajax Programming
hchen1
 
Java script Advance
Jaya Kumari
 
ASP.NET 12 - State Management
Randy Connolly
 
Copy of ajax tutorial
Abhishek Kesharwani
 
Introduction to ajax
Raja V
 
Introduction about-ajax-framework
Sakthi Bro
 
Web Scripting Project JavaScripts and HTML WebPage
Sunny U Okoro
 
Vb.Net Web Forms
Dutch Dasanaike {LION}
 
Session vii(java scriptbasics)
Shrijan Tiwari
 
Internet and Web Technology (CLASS-6) [BOM]
Ayes Chinmay
 
Getting Started with JavaScript
Kevin Hoyt
 
Asp PPT (.NET )
Ankit Gupta
 
22 j query1
Fajar Baskoro
 
ajax_pdf
tutorialsruby
 

Similar to Asp.docx(.net --3 year) programming (20)

PPTX
Microsoft asp.net online training
training3
 
PPTX
Microsoft asp.net online training
training13acutesoft
 
DOC
Cis407 a ilab 2 web application development devry university
lhkslkdh89009
 
PPTX
MICROSOFT ASP.NET ONLINE TRAINING
Santhosh Sap
 
PPTX
MICROSOFT ASP.NET ONLINE TRAINING
training3
 
PPTX
Microsoft asp.net online training
Santhosh Reddy
 
PPTX
MICROSOFT ASP.NET ONLINE TRAINING
sapcrmtraining
 
PPTX
MICROSOFT ASP.NET ONLINE TRAINING
Santhosh Sap
 
DOCX
Cis 407 i lab 2 of 7
helpido9
 
PPTX
Web Server Controls VB Set 1
sunmitraeducation
 
PDF
ASP.Net, move data to and from a SQL Server Database
Christopher Singleton
 
DOCX
Lab StepsSTEP 1 Login Form1. In order to do this lab, we need.docx
smile790243
 
PDF
SYSTEMS DESIGN / CAPSTONE PROJECT
Sanjay Saluth
 
DOC
Library Project
Holly Sanders
 
DOC
Cis407 a ilab 6 web application development devry university
lhkslkdh89009
 
DOCX
need help completing week 6 ilab.. i will upload what I currently ha.docx
niraj57
 
TXT
Date difference[1]
shafiullas
 
DOC
Open microsoft visual studio/tutorialoutlet
Mitchinson
 
DOCX
2. A parking garage charges a $2.00 minimum fee to park for up to thr.docx
ajoy21
 
DOC
Baitap tkw
nguyenquy2101
 
Microsoft asp.net online training
training3
 
Microsoft asp.net online training
training13acutesoft
 
Cis407 a ilab 2 web application development devry university
lhkslkdh89009
 
MICROSOFT ASP.NET ONLINE TRAINING
Santhosh Sap
 
MICROSOFT ASP.NET ONLINE TRAINING
training3
 
Microsoft asp.net online training
Santhosh Reddy
 
MICROSOFT ASP.NET ONLINE TRAINING
sapcrmtraining
 
MICROSOFT ASP.NET ONLINE TRAINING
Santhosh Sap
 
Cis 407 i lab 2 of 7
helpido9
 
Web Server Controls VB Set 1
sunmitraeducation
 
ASP.Net, move data to and from a SQL Server Database
Christopher Singleton
 
Lab StepsSTEP 1 Login Form1. In order to do this lab, we need.docx
smile790243
 
SYSTEMS DESIGN / CAPSTONE PROJECT
Sanjay Saluth
 
Library Project
Holly Sanders
 
Cis407 a ilab 6 web application development devry university
lhkslkdh89009
 
need help completing week 6 ilab.. i will upload what I currently ha.docx
niraj57
 
Date difference[1]
shafiullas
 
Open microsoft visual studio/tutorialoutlet
Mitchinson
 
2. A parking garage charges a $2.00 minimum fee to park for up to thr.docx
ajoy21
 
Baitap tkw
nguyenquy2101
 
Ad

More from Ankit Gupta (20)

PPT
Biometricstechnology in iot and machine learning
Ankit Gupta
 
PDF
Week2 cloud computing week2
Ankit Gupta
 
PDF
Week 8 lecture material
Ankit Gupta
 
PDF
Week 4 lecture material cc (1)
Ankit Gupta
 
PDF
Week 3 lecture material cc
Ankit Gupta
 
PDF
Week 1 lecture material cc
Ankit Gupta
 
PDF
Mod05lec25(resource mgmt ii)
Ankit Gupta
 
PDF
Mod05lec24(resource mgmt i)
Ankit Gupta
 
PDF
Mod05lec23(map reduce tutorial)
Ankit Gupta
 
PDF
Mod05lec22(cloudonomics tutorial)
Ankit Gupta
 
PDF
Mod05lec21(sla tutorial)
Ankit Gupta
 
PDF
Lecture29 cc-security4
Ankit Gupta
 
PDF
Lecture28 cc-security3
Ankit Gupta
 
PDF
Lecture27 cc-security2
Ankit Gupta
 
PDF
Lecture26 cc-security1
Ankit Gupta
 
PDF
Lecture 30 cloud mktplace
Ankit Gupta
 
PDF
Week 7 lecture material
Ankit Gupta
 
PDF
Gurukul Cse cbcs-2015-16
Ankit Gupta
 
PDF
Microprocessor full hand made notes
Ankit Gupta
 
PPTX
Transfer Leaning Using Pytorch synopsis Minor project pptx
Ankit Gupta
 
Biometricstechnology in iot and machine learning
Ankit Gupta
 
Week2 cloud computing week2
Ankit Gupta
 
Week 8 lecture material
Ankit Gupta
 
Week 4 lecture material cc (1)
Ankit Gupta
 
Week 3 lecture material cc
Ankit Gupta
 
Week 1 lecture material cc
Ankit Gupta
 
Mod05lec25(resource mgmt ii)
Ankit Gupta
 
Mod05lec24(resource mgmt i)
Ankit Gupta
 
Mod05lec23(map reduce tutorial)
Ankit Gupta
 
Mod05lec22(cloudonomics tutorial)
Ankit Gupta
 
Mod05lec21(sla tutorial)
Ankit Gupta
 
Lecture29 cc-security4
Ankit Gupta
 
Lecture28 cc-security3
Ankit Gupta
 
Lecture27 cc-security2
Ankit Gupta
 
Lecture26 cc-security1
Ankit Gupta
 
Lecture 30 cloud mktplace
Ankit Gupta
 
Week 7 lecture material
Ankit Gupta
 
Gurukul Cse cbcs-2015-16
Ankit Gupta
 
Microprocessor full hand made notes
Ankit Gupta
 
Transfer Leaning Using Pytorch synopsis Minor project pptx
Ankit Gupta
 
Ad

Recently uploaded (20)

PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
community health nursing question paper 2.pdf
Prince kumar
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
Dimensions of Societal Planning in Commonism
StefanMz
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 

Asp.docx(.net --3 year) programming

  • 1. Unit 05: Webform1.aspx <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title> Calendar VisibleMonthChanged Example</title> </head> <body> <form id="form1" runat="server"> <div> <h3> Calendar VisibleMonthChanged Example </h3> Select a different month on the calendar. <br /><br /> <asp:Calendar id="Calendar1" runat="server" OnVisibleMonthChanged="MonthChange"> <WeekendDayStyle BackColor="gray"> </WeekendDayStyle> </asp:Calendar> <hr /> <table border="1"> <tr style="background-color:Silver"> <th> Month navigation direction </th> </tr> <tr> <td> <asp:Label id="Message" Text="Starting Month." runat="server"/> </td> </tr> </table>
  • 2. </div> </form> </body> </html> Webform1.aspx.vb Public Class WebForm1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Sub MonthChange(sender As Object, e As MonthChangedEventArgs) If e.NewDate.Month > e.PreviousDate.Month Then Message.Text = "You moved forward one month." Else Message.Text = "You moved backwards one month." End If End Sub End Class
  • 4. Program 02: Using the Validation Controls Webform2.aspx <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="WebApplication2.WebForm2" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title><h1>Using the Validation Control</h1></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="RequiredField Validator Control Example" Font-Bold="True" Font-Size="Medium" Font-Underline="True"></asp:Label> <br /> <br /> <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Small" Text="User name:"></asp:Label> &nbsp;&nbsp; <asp:TextBox ID="TextBox1" runat="server" Height="22px" Width="175px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="User name can not be empty"></asp:RequiredFieldValidator> <br /> <br /> <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="Small" Text="Password:"></asp:Label> &nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox2" runat="server" Height="22px" TextMode="Password" Width="175px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" ErrorMessage="Password can not be empty"></asp:RequiredFieldValidator> <br /> <br /> Age:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox3" runat="server" ViewStateMode="Disabled" Width="175px"></asp:TextBox> <asp:RangeValidator runat="server" id="rngDate" controltovalidate="TextBox3" minimumvalue="20" maximumvalue="30" errormessage="Please enter the age between 20 to 30" /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <asp:Button ID="Button1" runat="server" BackColor="Black" Font-Bold="True" Font-Size="Medium" ForeColor="White" Text="Submit" />
  • 5. </div> </form> </body> </html> Webform2.aspx.vb Public Class WebForm2 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub End Class
  • 6. Program 03: Designing Websites with Master Pages Webform2.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"MasterPa geFile="~/MasterPage.master" %> <asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> </asp:Content> Master.master <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Master Page with Menu control in asp.net with example</title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> <style type="text/css"> .parent_menu { width: 110px; background-color: #8AE0F2; color: #000; text-align: center; height: 30px; margin-right: 5px; } .child_menu { width: 110px; background-color: #000; color: #fff; text-align: center; height: 30px; line-height: 30px; } .sub_menu { width: 110px; background-color: #000; color: #fff; text-align: center; height: 30px; line-height: 30px; margin-top: 5px;
  • 7. } .selected_menu { background-color: #FF6600; } .hover_menu { background-color: #990000; color:#fff; } </style> </head> <body> <form id="form1" runat="server"> <div> <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" /> <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1"Orientation="Horizontal"> <LevelMenuItemStyles> <asp:MenuItemStyle CssClass="parent_menu" /> </LevelMenuItemStyles> <LevelSelectedStyles> <asp:MenuItemStyle CssClass="child_menu" /> </LevelSelectedStyles> <DynamicMenuItemStyle CssClass="sub_menu" /> <DynamicHoverStyle CssClass="hover_menu" /> <StaticSelectedStyle CssClass="selected_menu" /> <StaticHoverStyle CssClass="hover_menu" /> </asp:Menu> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> </html> SiteMap <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="" title="" description=""> <siteMapNode url="Default.aspx" title="Home" description="Home Page"/> <siteMapNode url="Forums.aspx" title="Forums" description="Forums Page"/> <siteMapNode url="Careers.aspx" title="Careers" description="Careers Page" > <siteMapNode url="Jobs.aspx" title="Jobs" description="Jobs Page" /> <siteMapNode url="upload.aspx" title="Upload" description="Upload Page" /> </siteMapNode> <siteMapNode url="ContactUs.aspx" title="Contact US" description="ContacUs Page" /> </siteMapNode> </siteMap>