<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Issues using HyperLink control with an image in a URL Rewriting scenario</title><link>http://weblogs.asp.net/stefansedich/archive/2008/01/19/issues-using-hyperlink-control-with-an-image-in-a-url-rewriting-scenario.aspx</link><description>Hey All, I was using the HyperLink control in my page and added URL Rewriting to my page so that for example: http://site/test/test/default.aspx would be rewritten to http://site/default.aspx. I had a HyperLink control on the default page like so: &amp;lt;asp</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Issues using HyperLink control with an image in a URL Rewriting scenario</title><link>http://weblogs.asp.net/stefansedich/archive/2008/01/19/issues-using-hyperlink-control-with-an-image-in-a-url-rewriting-scenario.aspx#5629727</link><pubDate>Mon, 21 Jan 2008 14:34:23 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5629727</guid><dc:creator>AndrewSeven</dc:creator><author>AndrewSeven</author><description>&lt;p&gt;I guess that when you postback, its to: /site/test.aspx?param1=x&amp;amp;param2=x&lt;/p&gt;
&lt;p&gt;If you need compatibility with your current one, you can manage/juggle the not-adding-duplicate qs parameters directly in the handler.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5629727" width="1" height="1"&gt;</description></item><item><title>re: Issues using HyperLink control with an image in a URL Rewriting scenario</title><link>http://weblogs.asp.net/stefansedich/archive/2008/01/19/issues-using-hyperlink-control-with-an-image-in-a-url-rewriting-scenario.aspx#5626950</link><pubDate>Mon, 21 Jan 2008 01:01:38 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5626950</guid><dc:creator>stefan.sedich</dc:creator><author>stefan.sedich</author><description>&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Yeah that is my case &lt;a rel="nofollow" target="_new" href="http://site/test/param1/param2.aspx"&gt;site/.../param2.aspx&lt;/a&gt; gets rewritten to &lt;a rel="nofollow" target="_new" href="http://site/test.aspx?param1=x&amp;amp;param2=x"&gt;site/test.aspx&lt;/a&gt; I know this could always be stored in a dictionary but I like the idea that if I swap out the url rewriting with my current solution it will still work.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5626950" width="1" height="1"&gt;</description></item><item><title>re: Issues using HyperLink control with an image in a URL Rewriting scenario</title><link>http://weblogs.asp.net/stefansedich/archive/2008/01/19/issues-using-hyperlink-control-with-an-image-in-a-url-rewriting-scenario.aspx#5624894</link><pubDate>Sun, 20 Jan 2008 15:43:29 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5624894</guid><dc:creator>AndrewSeven</dc:creator><author>AndrewSeven</author><description>&lt;p&gt;Ya, rather than masking, it serves the page at the requested url by loading the right handler :)&lt;/p&gt;
&lt;p&gt;In regards to query strings&lt;/p&gt;
&lt;p&gt;You can have query string variables and they work as normal. &lt;/p&gt;
&lt;p&gt;The example just looks for the language part and removes it to determinethe real page, it passes the query string along as-is&lt;/p&gt;
&lt;p&gt;The only time you should have any issue with the qs is if you want to use it to convert parts of the path into a query string.&lt;/p&gt;
&lt;p&gt;Its better to keep a custom dictionary (eg &amp;quot;PathParamers&amp;quot;) in the httpcontext.current items &amp;nbsp;to hold them. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;(If you convert the path directly to qs arguments, so that site/color/red/All.aspx executes the pages site/All.aspx?color=red, then when you have postback, you postback to &amp;nbsp;site/color/red/All.aspx?color=red) &amp;nbsp;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5624894" width="1" height="1"&gt;</description></item><item><title>re: Issues using HyperLink control with an image in a URL Rewriting scenario</title><link>http://weblogs.asp.net/stefansedich/archive/2008/01/19/issues-using-hyperlink-control-with-an-image-in-a-url-rewriting-scenario.aspx#5621936</link><pubDate>Sun, 20 Jan 2008 01:14:53 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5621936</guid><dc:creator>stefan.sedich</dc:creator><author>stefan.sedich</author><description>&lt;p&gt;Looks interesting. With this solution is it possible to still have your query string variables? What I like about the way I am doing it is that you could effectively turn off URL masking and it would still work fine.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5621936" width="1" height="1"&gt;</description></item><item><title>re: Issues using HyperLink control with an image in a URL Rewriting scenario</title><link>http://weblogs.asp.net/stefansedich/archive/2008/01/19/issues-using-hyperlink-control-with-an-image-in-a-url-rewriting-scenario.aspx#5620542</link><pubDate>Sat, 19 Jan 2008 18:48:06 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5620542</guid><dc:creator>AndrewSeven</dc:creator><author>AndrewSeven</author><description>&lt;p&gt;I had fewer problems when I used an HandlerFactory instead of a url rewriter.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://weblogs.asp.net/andrewseven/pages/UrlRewriting.aspx"&gt;weblogs.asp.net/.../UrlRewriting.aspx&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5620542" width="1" height="1"&gt;</description></item></channel></rss>