ASP.NET postbacks creates issue in URL rewriting?

最后都变了- 提交于 2019-12-18 20:48:08

问题


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.


回答1:


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;
    }



回答2:


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.



来源:https://stackoverflow.com/questions/5191612/asp-net-postbacks-creates-issue-in-url-rewriting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!