Open vikasNew opened 7 years ago
i need to use multiple sitemap files in my MVC application for different Areas.
i am using mvcsitemapprovider v4 version.
How can i do this without using DI.
I tried this by adding below code in my web.config, but this does not work.
`
also i used the below code to call them..
`var currentArea = (string)ViewContext.RouteData.DataTokens["area"]; if (string.IsNullOrWhiteSpace(currentArea)) {
} else if (currentArea.ToString() == "Admin") {
}`
Please help me on this.
Thanks in anticipation.
i need to use multiple sitemap files in my MVC application for different Areas.
i am using mvcsitemapprovider v4 version.
How can i do this without using DI.
I tried this by adding below code in my web.config, but this does not work.
`
`
also i used the below code to call them..
`var currentArea = (string)ViewContext.RouteData.DataTokens["area"]; if (string.IsNullOrWhiteSpace(currentArea)) {
} else if (currentArea.ToString() == "Admin") {
}`
Please help me on this.
Thanks in anticipation.