CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 2/6/2008 12:40:14 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 22 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
gogosweb
Asp.Net User
SqlSiteMapProvider tip ...2/6/2008 12:40:14 AM

0/0

does anybody knows how can we have 2 or more different  SiteMapDataSource of type="SqlSiteMapProvider" on the same page ?


There are 10 types of people - those who understand binary and those who don't
RJA
Asp.Net User
Re: SqlSiteMapProvider tip ...2/6/2008 2:09:32 AM

0/0

I know you can do it with XML sitemaps, but not so sure about the SqlSiteMapProvider.  I'd be interested to learn this as well.

Dave Sussman
Asp.Net User
Re: SqlSiteMapProvider tip ...2/6/2008 10:11:08 AM

0/0

If they are using the same provider you simply decare the two data source controls but give them different IDs; you then bind the appropriate menu control to the specific data source control.

<asp:SiteMapDataSource ID="ds1" runat="server" ... />
<asp:SiteMapDataSource ID="ds2" runat="server" ... />

<asp:Menu id="m1" runat="server" DataSourceId="ds1" ... />
<asp:Menu id="m2" runat="server" DataSourceId="ds2" ... />

The problem comes with the SiteMapPath, which doesn't use a data source, but goes directly to the provider. In this case you'd need to declare the provider twice in web.config, just giving it a separate name. Then each SiteMapDataSource can set the SiteMapProvider property:

<asp:SiteMapDataSource ID="ds1" runat="server" SiteMapProvider="SqlProvider1"... />
<asp:SiteMapDataSource ID="ds2" runat="server" SiteMapProvider="SqlProvider2" ... />

You can also set the SiteMapProvider property on the SiteMapPath so that the path is from the correct provider.

 

 

3 Items, 1 Pages 1 |< << Go >> >|



Search This Site:


Meet Our Sponsors:



Other Resources:

Desktop Agent Logs - novell.support.zenworks.desktop-management.6x ... ... the Cisco Technical Tips Conventions for more information ... how do you refresh menu when using sqlsitemapprovider. how to show a user only his own data? ...
SqlSiteMapProvider in VB.NET Windows Administration/Tips. Developing & Best Practices. Classic ASP. VB.NET ... Summary description for SqlSiteMapProvider ''' </summary> ...
Wicked Code: Power Programming Tips for ASP.NET 2.0 SqlSiteMapProvider looks and behaves like XmlSiteMapProvider in almost every way, ... The key method in SqlSiteMapProvider is BuildSiteMap. ...
Menu CSS adapter and SqlSitemapProvider - ASP.NET Forums ... via SqlSitemapProvider. ... ASP.NET: Silverlight Tips of the Day - Week 4. Channel 10: PPS08: Icon's ... ASP.NET: ASP.NET MVC Tip #32 – Repopulate Form ...
Sanjay - Tuesday, August 07, 2007 Entries Summary description for SqlSiteMapProvider ''' </summary> ... Windows Administration/Tips. Developing & Best Practices. Classic ASP. VB.NET. Syndication: ...
MJJames - Web Developer: More ASP.Net Antics - using the Site ... ... you want a copy of the SQLSiteMapProvider I am using then grab this zip ... Tags: ASP.NET, SQL, SQLSiteMapProvider, Tips and Tricks. 0 comments: Post a Comment ...
MJJames - Web Developer: Del.icio.us Links For 07/05/2007 MSDN Article on there SqlSiteMapProvider - 7 May, 2007 ... More Vista Tips - IIS 7 and Visual Studio 2005. Del.icio.us Links For 22/05/2007 ...
Wriju's BLOG : Changing the SiteMapDataSource's XML filename at runtime Applies to: ASP.NET 2.0 ASP.NET 2.0 comes with set of very ... is recommended that you should use SqlSiteMapProvider for all dynamic scenarios. ... Great tip. ...



 
All Times Are GMT