Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET postbacks creates issue in URL rewriting?

I am using Intelligencia for url rewriting in my asp.net project.

I have solved many issues by doing R & D for url rewriting but right now i stuck with one issue regarding page postback.

page postback change my rewrite url to original url.

SO, anyone help me to get out from here.

like image 691
sikender Avatar asked Mar 04 '11 08:03

sikender


2 Answers

You can code this in your master page for this problem

Here form1 is the form tag and place it in master page's load event

  protected void Page_Load(object sender, EventArgs e)
    {
        form1.Action = Request.RawUrl;
    }
like image 189
sikender Avatar answered Nov 18 '22 05:11

sikender


You'll probably need to use a custom From control to handle the re-written URLs, there's an excellent blog from Scott Gu on the subject here:

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

It should be a good starting point.

like image 30
Rob Stone Avatar answered Nov 18 '22 07:11

Rob Stone