views:

21

answers:

1

I am using the UrlRewriter.NET library to perform URL rewriting. I noticed that themes do not work properly as the browser tries to retrieve the CSS file incorrectly.

The link tag generated by ASP.NET automatically is as follows:

<link href="App_Themes/vertebrata/style.css" type="text/css" rel="stylesheet" />

URL typed into browser: localhost:1708/BloggingEngine/aa Displays fine

URL typed into browser: localhost:1708/BloggingEngine/aa/ Browser does not load the CSS file

I can probably fix the problem by prefixing a "/" before the URL in the href attribute, but this is dynamically generated by ASP.net depending on selected theme and I have no control over it.

How do I get ASP.net to load themes properly?

A: 

Not a direct answer to the question but a pointer to URL rewriting -

Now I haven't investigated the issue at all, and there may be a simple fix - as you have suggested. However, you , may find the following article interesting.

http://msdn.microsoft.com/en-us/library/ms972974.aspx

brumScouse