CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 3/14/2006 9:56:59 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 8 Views: 43 Favorited: 0 Favorite
9 Items, 1 Pages 1 |< << Go >> >|
DRONICH
Asp.Net User
Web.sitemap + navigation control3/14/2006 9:56:59 AM

0

Hi there!
I trying to build siple menu, something like this:

home | contact | info 

and submenu for contact, something like --me, --us

First, how i can get a simple horisontal menu using navigation controls?

Secong how to use Web.sitemap to create that kind menu?
Unfortunatly cant use like this

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="~/home.aspx" title="home"/>
<siteMapNode url="~/contact.aspx" title="contact">
   <siteMapNode url="~/me.aspx" title="me"/>
   <siteMapNode url="~/us.aspx" title="us"/>
</siteMapNode>
....

Thanx

--D.

DRONICH
Asp.Net User
Re: Web.sitemap + navigation control3/14/2006 11:24:52 AM

0

Hi, find out how to make horisontal menu ;) Properties-->Orientation....

But how to build xml?

orzeh
Asp.Net User
Re: Web.sitemap + navigation control3/14/2006 12:54:44 PM

0

hi!

the only way is to build web.sitemap file as you posted.
remember that you can have several site maps in a signle site, so there should be no problem with it.

orzeh


code less, think more!
dannychen
Asp.Net User
Re: Web.sitemap + navigation control3/14/2006 6:34:52 PM

0

There are a couple things you can do.

1) You can create a dummy top level node and then set "ShowStartingNode=false" on the SiteMapDataSource

2) You can set StaticDisplayLevels=2 on your Menu control to show the first two levels and have contact/info nodes under the home node.  I recommend this method although the first one works as well.

As for the middle seperators - there are also several ways to do this

1) Use the TopSeperatorImageUrl or BottomSeperatorImageUrl properties

2) Use templating + some code to remove the first/last image

3) Add dummy nodes in your sitemapnode file that look kind of like this:

   <siteMapNode title="|" />

These won't be clickable but will render between your items.

--
Danny


disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
DRONICH
Asp.Net User
Re: Web.sitemap + navigation control3/15/2006 6:18:29 AM

0

Thanx guys!

That is great: StaticDisplayLevels=2

--D.

DRONICH
Asp.Net User
Re: Web.sitemap + navigation control3/15/2006 6:54:44 AM

0

And one more....
How to make that text will be at the middle of cell?

<td valign=top align=left colspan="2" >

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

<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" StaticDisplayLevels="2" CssClass=White_10_bold StaticEnableDefaultPopOutImage="False" StaticSubMenuIndent="0px" ><DynamicMenuItemStyle BackColor="#ED1C24" BorderColor="#808080" BorderStyle="Solid" BorderWidth="1px" Height="20px" ItemSpacing="1px" Width="100px" HorizontalPadding="10px" /><StaticMenuItemStyle BackColor="#ED1C24" BorderColor="#808080" BorderStyle="Solid" BorderWidth="1px" Height="20px" ItemSpacing="1px" Width="100px" HorizontalPadding="10px" /></asp:Menu>

</td>

dannychen
Asp.Net User
Re: Web.sitemap + navigation control3/15/2006 3:47:28 PM

0

For centering, try applying a CSS class to the StaticMenuItemStyle with text-align:center; 

--
Danny


disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
DRONICH
Asp.Net User
Re: Web.sitemap + navigation control3/16/2006 5:48:37 AM

0

Hmm, that not working....
Style:
text-align: center;font-size: 10px;color: #ffffff;font-family: Verdana;text-decoration: none;

<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" StaticDisplayLevels="2" StaticEnableDefaultPopOutImage="False" StaticSubMenuIndent="0px">

<DynamicMenuItemStyle BackColor="Gray" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" Height="15px" ItemSpacing="1px" Width="110px" CssClass="White_10_bold" />

<StaticMenuItemStyle BackColor="Gray" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" Height="15px" ItemSpacing="1px" Width="110px" CssClass="White_10_bold" />

<StaticHoverStyle BackColor="#ED1C24" CssClass="White_10_bold" />

<DynamicHoverStyle BackColor="#ED1C24" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" CssClass="White_10_bold" />

<DynamicMenuStyle CssClass="White_10_bold" />

<StaticSelectedStyle BackColor="#ED1C24" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" CssClass="White_10_bold" />

<DynamicSelectedStyle BackColor="#ED1C24" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" CssClass="White_10_bold" />

<StaticMenuStyle CssClass="White_10_bold" />

</asp:Menu>

dannychen
Asp.Net User
Re: Web.sitemap + navigation control3/16/2006 5:14:00 PM

0

I'm not sure what you're doing different, this worked for me:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default5.aspx.vb" Inherits="Default5" %>

<!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>
    <style type="text/css">
        .test { text-align: center; }
    
</style>
</
head>
<
body>
    <form id="form1" runat="server">
    <div>
        <asp:Menu ID="Menu1" runat="server">
            <Items>
                <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
                <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
                <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
            </Items>
            <StaticMenuItemStyle CssClass="test" BorderWidth="1px" BorderStyle="solid" BorderColor="black" Width="110px" />
        </asp:Menu>
    
    
</div>
    </form>
</
body>
</
html>

disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
9 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Visual Web Developer 2005 Express Edition For Dummies Authors: Alan Simpson, Pages: 358, Published: 2005
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
Professional ASP.NET 2.0 XML Authors: Thiru Thangarathinam, Pages: 566, Published: 2005
ASP.NET 3.5 For Dummies Authors: Ken Cox, Pages: 404, Published: 2008
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007
Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter Kit: visual web developer 2005 express edition starter kit Authors: David Sussman, Alex Homer, Pages: 312, Published: 2005
Expert C# 2005 Business Objects Authors: Rockford Lhotka, Pages: 668, Published: 2006
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008
ASP.NET 2.0 All-In-One Desk Reference For Dummies: all-in-one desk reference for dummies Authors: Doug Lowe, Jeff Cogswell, Ken Cox, Pages: 910, Published: 2006
Beginning Visual Web Developer 2005 Express: From Novice to Professional Authors: Paul Sarknas, Rick Delorme, Pages: 334, Published: 2005

Web:
Site Navigation control in asp.net - Asp.Net, C#, SQL Blog Nov 6, 2007 ... Before using Site Navigation control let go through overview of web.sitemap, which is used as datasource to assign this control. ...
ASP.NET.4GuysFromRolla.com: Examining ASP.NET 2.0's Site ... Nov 16, 2005 ... NET 2.0 ships with a number of navigation Web controls that make displaying the site map as easy as dragging and dropping a control onto ...
Walkthrough: Adding Site Navigation to a Web Site Create a Web site that has example pages and a site-map file that describes the layout of the pages. Use the TreeView control as a navigation menu that lets ...
ASP.NET 2.0 Navigation The control displays a standard site navigation menu. Code Example: ... The SiteMapPath control uses the web.sitemap file by default. ...
DotNetBips.com :: Blossom your .NET skills Aug 17, 2008 ... Now key in the following XML markup in the web.sitemap file. .... For example, you may want to develop a custom navigation control that ...
Treeview Navigation - SqlCacheDependency and SqlSitemapProvider Apr 11, 2007 ... How to create a Sitemap from a database table with the SqlSitemapProvider and use it to populate your web site's TreeView Navigation Control ...
Page 3 - Web Site Navigation Using a SiteMap Nov 15, 2006 ... Web Site Navigation Using a SiteMap - Site Navigation with Menu Control. (Page 3 of 4 ). Site navigation as implemented in ASP. ...
Basic site navigation: sitemap (providers), menus and sitemappaths ... Web.UI.WebControls.)Menu control it has become so much easier to ... of site navigation using the menu control in combination with a sitemap datasource. ...
Build an ASP.NET 2.0 Web Site Navigation System Pt1 NET navigation system. In part one, web pages are added to a web site and ... NET 2.0 SiteMap file. In part two an ASP.NET 2.0 Menu control will be tied to ...
A1 Sitemap Generator - Create ASP.Net XML sitemap for navigation ... This ASP menu and navigation sitemap file is usually named "Web.sitemap". ... SiteMapPath : Breadcrumb control that displays navigation path back to ...

Videos:
Adding Visual Studio 2008 Menu Control to A Website Navigation is very important in a website, in this video i'll be showing you how to easily add navigation to your website using the web.sitemap ...
Affiliate Summit 2006 East -- Blogging Best Practices ... Blogging guru Dave Taylor will take you on a controversial and entertaining tour of blog technologies, explain which are considered "critical" by ...












treeview isn't updated from xmldatasource

master page + theming = the controls collection cannot be modified because the control contains code blocks

gridview page flip: the file web.sitemap required by xmlsitemapprovider does not exist.

adding nodes to a sitemappath programatically

override sitemappath in master page

use different css depending on where directed from

master page issue help?

treeview looses focus

treeview customization with web.sitemap vs. programmatic setup

publicly expose specific controls in masterpage (can it be done?)

valuepath property doesn't return root value

asp.net menu navigation problem

position:fixed in ie6

treeview output as div's - not tables

menu with sitemapdatasource

character needed for theme directory

determine theme name stored in web.config

overriding cursor style in menu items

getting an error related to system.web after adding new mastertemplate to site

how to load a particular node as collapsed in treeview

help needed

how to direct a form on a menu item?

master page loads *after* child pages?

using treeview(componentart treeview)

are skins fubar and crippled?

right click ot treeview

direct access to master page properties

treeview problem (i think this one's easy)

dynamic treeview control in master page

add base href tag to a master page

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT