I have dynamic urls to put in my webpage. Currently what i am doing is map those urls using url rewriter module in iis. That should be pre-configured. And I saw those rules in web.config
Anyhow I cannot get pre knowledge about urls that I am getting. As an example: for this question urls will be
- Dynamic URL Rewriting in ASP.net C#
- Rewrite URL with three dynamic parameters
- Url Rewriting vs. Routing
- http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx
what I want to put in my web application is MyWeb/ans1, MyWeb/ans2, MyWeb/ans3, myWeb/ans4
Therefore I need to have four rules in my rewriter (in this case).
I want to achieve url re writting thing in dynamically(run time). I can not predefine those rules. Is there any work arround to achieve this? put those rules to database table and fetch it, calling action method and do the rewrtting part. Or why can't I do this.
Thanks