asp.net - query string parameters for sitemap -



asp.net - query string parameters for sitemap -

i'm using vwd 2010, asp.net c#. found pointer how in post. unfortunately, can't working.

the sample code points here: http://weblogs.asp.net/jgaylord/adding-querystring-parameters-to-the-sitemapnode

i have included c# code this, can't seem programme recognize code there. set break points never invoked. set web.config:

<sitemap enabled="true"> <providers> <clear/> <add name="extendedsitemapprovider" type="configuration.extendedsitemapprovider" sitemapfile="web.sitemap" securitytrimmingenabled="true" /> <!-- <add sitemapfile="web.sitemap" name="aspnetxmlsitemapprovider" type="system.web.xmlsitemapprovider" securitytrimmingenabled="true"/> --> </providers> </sitemap>

notice how aspnetxmlsitemapprovider commented out. name appears else in file. nevertheless when effort run program, error message: the provider 'aspnetxmlsitemapprovider' specified defaultprovider not exist in providers collection.

if uncomment line, programme runs, new code never invoked. ideas?

that's because not specifying defaultprovider defaults aspnetxmlsitemapprovide, like can see here.

so have specify defualt provider this:

<sitemap enabled="true" defaultprovider="extendedsitemapprovider"> <providers> .... </providers> </sitemap>

or specify provider in corresponding sitempadatasource property, default isn't used.

asp.net sitemap querystringparameter sitemapprovider web.sitemap

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -