Last post Aug 01, 2008 10:10 AM by HenryTheHorse
Jul 31, 2008 10:11 PM|HenryTheHorse|LINK
I've looked at several posts regarding this issues but none of the recommended fixes seem to work. I tried writing a control adapter using <userAgent match="IE7" /> (this problem happens in IE7...haven't tried other browsers yet) but I still get the error.
I tried putting the UseCookies in the web.config...same error result. I even modified my call to RewritePath setting the rebaseClientPath flag to true: this worked BUT all my images are broken and the styles are gone. Does anyone have a solution to this?
Thank you in advance.
Aug 01, 2008 02:13 AM|gavinharriss|LINK
I don't quite understand fully what your problem is, but have an inkling what you might be struggling with...
Why don't you use "~" in urls so ASP.NET resolves this as the root of the website. Most ASP.NET server controls support use of ~ in urls. For those that don't simply use HttpUtility.ResolveUrl to get the same effect.
e.g. instead off "../flags/NZ.gif" you might use HttpUtility.ResolveUrl ("~/images/flags/NZ.gif") instead.
I find this useful when you have shared user controls in a sub directory but don't know where they are going to be used in the web site.
Aug 01, 2008 10:10 AM|HenryTheHorse|LINK
The error is caused by calling RewritePath with the AbsolutePath. If I don't call this function, the error doesn't occur...but I NEED to call this function to reset the query string (hence the the URL rewrite). Here's more info:
Anyway, I found the problem. The control that is triggering this error is "asp:placeholder" which I am using to store breadcrumbs. One of the controls that was added to my placeholder had a ImageUrl that contained "./" in the path.