URL rewriting doesnt seem to work with xml sitemap provider and menus

R

Ryan

Im building a mutli-lingual website in .net 2.0 and Im having an issue
with url rewriting and Im having an issue with the xml sitemap provider
and menus. If i have a url:
http://mysite.com/articles.aspx
and then change the local to ru-Ru for instance:
http://mysite.com/ru-Ru/articles.aspx

all the menus still point to the http://mysite.com/articles.aspx link
which puts the local back to english. This happens even if I use just
the page name "articles.aspx" in the url field in the site map
provider.

Does anyone know a way around this? such as a setting that can be
changed?

Cheers
 
G

Guest

Hi

This is because it gets reset by the page intializeculture() call.
You need to :
Create a basepage class and overide the intialiazeculture() function in it,
to set the culture based on a saved cookie or session variable, this class
would also need to inherit the web.ui.page class- you will see at the top of
your page code it inherits this class, replace it with your new class. (
your new class would inherit this web.ui.page class )
I hope that makes sense.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top