Menu

Want to work with us? We're on the lookout for a talented Digital Project Manager.

We're hiring

ASP.NET postbacks loses URL Rewriting

Web Bureau


01 May 2012 by Web Bureau

You may have noticed in ASP.NET when you do a postback on the page it loses the URL rewriting so something like www.mysite.com/news-article-1 becomes www.mysites.com/news.aspx?id=1

I found a solution to this here http://stackoverflow.com/questions/5191612/asp-net-postbacks-creates-problem-in-url-rewriting

In the Master Page page load event place the following code:

form1.Action = Request.RawUrl;

form1 being the id of your form tag.

Grow your businessStart a project with us today.