Google Search


Wednesday, May 28, 2008

Menu based on Sitemap

For creating menu based on sitemap,Firstly create Web.sitemap (Define Sitemap).Web.Sitemap has Title,Url and description attributes.

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="" >
<siteMapNode url="~/Default.aspx" title="Home" description="Home">
<siteMapNode url="~/contactus.aspx" title="Contact US" description="Contact US"/>
<siteMapNode url="~/aboutus.aspx" title="About Us" description="About Us"/>
<siteMapNode url="~/articles.aspx" title="Articles" description="Articles"/>

Then,in master page or .aspx drag and drop control and SiteMapDataSource.And set menu DataSourceID property to SiteMapDataSource.

<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" Font-Names="Verdana"
Font-Size="0.8em" ForeColor="#7C6F57" Orientation="Horizontal" StaticSubMenuIndent="10px"
BackColor="#F7F6F3" DynamicHorizontalOffset="2" StaticDisplayLevels="2"></asp:Menu>

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />

When you required Horizontal or Vertical menu then just set Orientation property of menu.By default this property set to Vertical.

In code we use DynamicHorizontalOffset property of menu to Gets or sets the number of pixels to shift a dynamic menu horizontally relative to its parent menu item.

In code we use StaticDisplayLevels property of menu to specify the number of menu levels to display in a static menu.


Anonymous said...

With out a doubt, amongst the most appealing traits a man can possess is confidence.

my page Pick Up A Girl (

Anonymous said...

Hi there, just became alert to your blog through Google, and found that it's truly informative.
I am going to watch out for brussels. I will be grateful if
you continue this in future. Lots of people will be
benefited from your writing. Cheers!

My webpage ... żółć

Anonymous said...

Replies 39th Floor, @ forty or confusion

Quit second fourteen days: nike free run womensmorning or phlegm in the throat,
think Keke out. Hey what time the throat can really refreshing it?
nike free 5.0 womensAfter quitting has been very plain,
no so-called black sputum, no appetite, no spirits,
no restless guilty nike free runaddiction, perhaps, this is the best
dull. Beijing today is very good, go out in the morning sunshine now
nike free run 3 womens pinkbeing stung glasses!
! !


I quit after two months, the throat is very refreshing, and breathing are also very easy ......

Here is my page :: nike free run 3 shoes

Pavel Co Ebele said...

Very much useful article. Kindly keep blogging

Java Training in Chennai

Java Online Training India