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

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 1/10/2008 11:23:59 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 37 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
simani
Asp.Net User
Initialise SiteMapProvider from code1/10/2008 11:23:59 AM

0/0

Hi All,

I have a custom site map provider (StaticSiteMapProvider) class. I need to initialise this NOT from the web.config file but from Application_Start of the global.asax.cs so that it is available to the whole website as it would be when it would be initialised from web.config. Any ideas?

Thanks,

~S

 


If my answer has helped you then please mark it as answer. It will help you and me gain some credit and resolve the thread.
siva_sm
Asp.Net User
Re: Initialise SiteMapProvider from code1/10/2008 12:54:05 PM

0/0

Make use of the Initialize() and BuildSiteMap() methods of the StaticSiteMapProvider (inherited from SiteMapProvider). A sample implementation of building site map from Access DB is here: http://msdn2.microsoft.com/en-us/library/system.web.staticsitemapprovider.aspx

Hope this helps?

simani
Asp.Net User
Re: Initialise SiteMapProvider from code1/10/2008 2:59:04 PM

0/0

Hi,

Thanks for your reply. I am using the two methods yo have mentioned. However, I still have to initiate the sitemap from my webconfig file. I dont want to do that. I want to have the flexibility of initiating this sitemap from anywhere I want in the code and not keep the following string in webconfig.

  <siteMap defaultProvider="CustomSiteMap" enabled="true">
   <providers>
    <add name="CustomSiteMap" type="MyNamespace.CustomSiteMap" connectionStringName="ConnectionString"/>
   </providers>

 I hope I am making some sense.

Cheers,

~S


If my answer has helped you then please mark it as answer. It will help you and me gain some credit and resolve the thread.
siva_sm
Asp.Net User
Re: Initialise SiteMapProvider from code1/11/2008 6:04:52 PM

0/0

You can keep the <sitemap> element empty and just ignore the parameters passed on to Initialize() method.

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


Free Download:

Books:
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Professional ASP.NET 2.0 Databases Authors: Thiru Thangarathinam, Pages: 504, Published: 2007
Pro ASP.NET for SQL Server: High Performance Data Access for Web Developers Authors: Brennan Stehling, Pages: 408, Published: 2007

Web:
Wicked Code: The SQL Site Map Provider You've Been Waiting For The SiteMapDataSource uses the default site map provider (typically .... And because all provider code outside the Initialize method must be thread-safe, ...
SiteMapProvider.Initialize Method (System.Web) Initializes the SiteMapProvider implementation, including any resources that are ... The following code example demonstrates how to override the Initialize ...
Wicked Code: The SQL Site Map Provider You've Been Waiting For ... Wicked Code: The SQL Site Map Provider You've Been Waiting For -- MSDN Magazine, ... Call the base class's Initialize method. base.Initialize(name, config); ...
Option Strict : Cory Isakson - Permission Manager SiteMapProvider Nov 23, 2005 ... First of all, I appoligize for writing the code in VB. ... First of all I extended the Initialize method so that I could verify that it was ...
C# Shiznit - Custom SiteMapProvider Incorporates QueryString Reliance The following code is a custom SiteMapProvider that derives from .... Inherits XmlSiteMapProvider Public Overrides Sub Initialize(ByVal name As String, ...
Fredrik Normén's Blog - NSQUARED2 I hope this post has given you some basic understanding of the SiteMap provider. You can get the whole source code from the following link: Download Source ...
Custom site map provider, root node not getting translated - ASP ... In my Custom provider (see code attached) first Initialize() is ... Make sure the control that uses the sitemap provider is in a UserControl ...
ASP.NET.4GuysFromRolla.com: Examining ASP.NET 2.0's Site ... Feb 1, 2006 ... In addition to actually creating the site map, the custom site map provider might also need some initialization code. ...
Writing your custom sitemap provider And write your own custom sitemap provider. Jef Prosise wrote an article about this in the wicked code magazine from Microsoft. ...
New ASP.NET 2.0 SQL Site Map Provider - ScottGu's Blog You can read all about it and download the code from here. ... by executing an SQL command within the site map provider's Initialize method. ...




Search This Site:










integrating with sharepoint

uh oh. i stupidly set the login page link to point to an irrelevant page -- and now can't log in

dotnetnuke project - debug or release

install issue

dnn 3.0 memberrole

gridview layout

need help in deploying asp.net web app to file share

official dotnetnuke website login problem

custom modules tutorial

protected page contents - is this a reasonable way of doing it?

3.0.9 child portal url issue

updating a masterpage property

dnn 3.0.4 - registration

compiling dnn 4 and up

xml docs

custom membership roles

using two instances of the solpartmenu, one without sub menu

dnn 3 email and feedback module problem

menu security not working

sql express db

javascript in content page

clean install of dnn 3.1.1 and i dont get any modules.

email & smtp questions

quick(?) dnn2>>dnn3 module upgrade for hire need asap!

i cant set the value of a propety in my user control

altavista (scooter/3.2) not crawuling dnn (core team please read?)

solpart.webcontrols error

problems with dropdown in createuserwizard

html/text module width

customization of aspnetdb functions

 
All Times Are GMT