开发者

Postback not firing using URLRewriting.Net in ASP.NET

Well, I'm not sure what the problem is exactly but my postback is not firing properly. I am using URLRewriting.Net and have it configured in an extension-less manner. So, the page I am working on is http://xxx.xxx/products and it rewrites to /products.aspx.

There's a button on my masterpage that's for a site search. There's a button on my contentpage as well. If I click the contentpage button, the page looks like it posts but my control events don't fire, just the page load event fires.

If I remove the button on the masterpage, it works fine. The masterpage button is wrapped in a panel with the defaultbutton set.

Or, if I leave the button on the masterpage and browse to the physical URL not using a rewritten URL, then it works fine.

What am I missing开发者_运维知识库?

Edit: I have traced this to a PostBackURL being set on the button on the masterpage that was to send the postback to /search/default.aspx. Removing the PostBackURL fixes the problem and events fire properly. But, why is this happening and how can I fix it? Thanks.


Here's a possible answer to your problem - I'm guessing it may be related.

It can be caused by breaking changes in ASP.NET 4.0, where the action attributes is rendered empty.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜