Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

SiteMapProvider

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Harclerode - 20 May 2008 23:48 GMT
I'm working on my first SiteMapProvider. I just implemented a
SiteMapProvider sample, as shown on this page:
http://msdn.microsoft.com/en-us/library/ms178434(VS.80).aspx. I set up my
Access database just like in the sample.

I then added a SiteMapDataSource, and a TreeView on my Default.aspx page.
Here's the ASP.Net code for those:

       <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
       <asp:TreeView ID="TreeView1" runat="server"
DataSourceID="SiteMapDataSource1" ExpandDepth="2">
       </asp:TreeView>

What I see when I run this is just the root node. What do I need to do in
order to see the other levels? I ran the debugger to verify that the Site
Map is being created correctly inside of the AccessSiteMapProvider class
(which I copied from the URL above).

Thanks,
Steve

Signature

My BizTalk blog:
http://stevestechnotes.blogspot.com/

Steve Harclerode - 21 May 2008 00:32 GMT
It's working all right now. Here's what the TreeView looks like at this
point:
       <asp:TreeView ID="TreeView1" runat="server"
DataSourceID="SiteMapDataSource1" ExpandDepth="2"
AutoGenerateDataBindings="False">
           <DataBindings>
               <asp:TreeNodeBinding DataMember="SiteMapNode"
TextField="Title"
                   ToolTipField="Description" NavigateUrlField="Url" />
           </DataBindings>
       </asp:TreeView>

> What I see when I run this is just the root node. What do I need to do in
> order to see the other levels? I ran the debugger to verify that the Site
> Map is being created correctly inside of the AccessSiteMapProvider class
> (which I copied from the URL above).
Steve Harclerode - 21 May 2008 01:05 GMT
I still have one question open -- is there a way to get the  TreeView to
show me only the current node and child nodes of the current node?

Right now it shows me the entire navigation heirarchy, starting with the
root node from the SiteMapProvider, no matter which page in the heirarchy
I'm currently on.

Thanks,
Steve

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.