Hi, I have web application with about 250 pages and i want to start implementing URL Rewriting using URLRewrite module. I have read all the basics in http://learn.iis.net/page.aspx/460/using-url-rewrite-module/ and tested the examples and they worked fine.
Now when I am trying to actually implement url rewriting to my site I have come across diffrent problems and have confusions. For now i have following quesions for which i ll be needing urgent answers.
1. I have developed my appliation in asp.net 2.0 in visual studio 2005, but it is mentioned in http://learn.iis.net/page.aspx/460/using-url-rewrite-module/ that ASP.NET updates tha come with the module to fix bugs are only for verision 3.5 or heigher. Does It mean i have to switch my site to asp.net 3.5?? Please anyone clarify
2. I have made a simple rule for testing as follows
<rule name="City">
<match url="city/([0-9])/([_0-9a-z-]+)" />
<action type="Rewrite" url="city.aspx?city={R:1}&cityname={R:2}" />
</rule>
it works fine, but as expected the images are not being displayed for example i have img tag in a repeater control which is bound like this
<img src='<%#"Images/Cities/"+cstr(DataBinder.Eval(Container.DataItem,"ID"))+DataBinder.Eval(Container.DataItem,"ImageName")%>' />
it is parsed like this in browser http://localhost/myap/City/1/Images/Cities/1/someimage.jpg
Similarly i have <a> tag inside repeater databound control bounded like this
<a href='<%# "Citydetail.aspx?city="+cstr(DataBinder.Eval(Container.DataItem,"Id"))+"&name="+DataBinder.Eval(Container.DataItem,"Name") %>'><%# DataBinder.Eval(Container.DataItem,"Name") %></a>
what i m getting in browser is something like this <a href='http://localhost/myapp/City/1/citydetail.aspx?id=1&name=NewYork' ></a>
Please someone guide me how to fix these issues.
3. This is how I m refrencing javascript files in html head tag
<script src="Scripts/common.js"></script>. Please someoen suggest how script files should be refrenced.
These are the urgent quesions i have. Anyone who helps ll be greatly appreciated.
Thanks