views:

65

answers:

1

I'm using URLRewritingNet 2.0. How do I rewrite URL's in ASP.NET?

I request is here >>

Input: www.sampleweb.com/param1/value1/param2/value2/default.aspx

Output: www.sampleweb.com/default.aspx?param1=value1&param2=value2

Must work dynamically like this param1/value1/param2/value2/ ... /paramN/valueN

A: 

That is not a good way to pass key/value pairs.

You should assume the key based on the values position. That makes life a lot easier. HttpContext.RewritePath (with its variations) is how you go about transforming the url.

Andrew Siemer