开发者

In url rewriting, why is the postback giving the wrong url?

I am experimenting wit开发者_运维问答h URL Rewriting. The first time it displays with the correct url. After perfroming any event handling, the form posts back, and then it has wrong url. Like the page url is http://devweb.tsgdomain.com/nphnewdemo/Enewsletter/68 and when i click url button then it gives wrong url http://devweb.tsgdomain.com/nphnewdemo/Enewsletter/popup.aspx?name=dev-test-please-review-it insted of this url http://devweb.tsgdomain.com/nphnewdemo/popup.aspx?name=dev-test-please-review-it.

Please suggest some answers to why this is happening (and how I can make this work correctly).


This is happens because the form is rendering using the actual URL (and not what user see).

If you like to change that you can be rewriting the form attribute making a global handler of the form.

Here is a full solution that is tested and working.

http://www.koders.com/csharp/fid39B3A4A2AD871AA78E7E5D8643A076EF4352CDF9.aspx

In the aboce code the line that make the change is the

value = Context.Request.RawUrl;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜