Get app relative url from Request.Url.AbsolutePath

Its a little late to answer but there is a elegant solution to this. You can use

Request.Url.PathAndQuery

This will return the relative path of the page.

For example, if the URL is www.example.com/products?A=a&B=b&C=c, the above piece of code will return /products?A=a&B=b&C=c

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)