Thursday, 13 March 2014

URL querystring with multiple parameters not working - Browser compatibility Issue

When passing multiple parameters as query string, the redirection will work properly in Internet Explorer. This is because the special character '&' is escaped automatically.

But in Mozilla, Chrome it will not work.
www.example.com/controller/action?a=1&b=2

In order to work we need to escape the ampersand special character using Razor syntax @Html.Raw(string).

www.example.com/controller/action?a=1&b=2


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam aliquam massa quis mauris sollicitudin commodo venenatis ligula commodo.

Related Posts

0 comments:

Post a Comment