在ASP.NET两次回传两次、回传、ASP、NET

2023-09-10 18:25:03 作者:月光下微微旳浅笑

我的页面是两次完全回发。我使用的母版页使用AJAX。为母版页的结构如下:

My page is fully postback twice. I am using master page with AJAX. The structure of master page is as follows.

+---------------------------------------------+

|  Web User Control with AJAX Tab Control     |

+---------------------------------------------+

|        |                     |              |

| Col1   | ContentPlaceHolder  |   Col3       |

|        |                     |              |

|        |                     |              |

+---------------------------------------------+

该网站的用户控件包含了AJAX标签与容器上的AutoPostBack

The web user control contains the AJAX Tab Container with AutoPostback on.

我已经创建了使用该母版的几个ASPX页面。

I have created several ASPX pages using this masterpage.

内容占位也得到根据页面的Web用户控件。

The content place holder also gets a web user control depending upon page.

每当我通过点击标签页面被完全postbacked两次跳一个页面上。我不明白什么原因。这使得查看报告繁琐,因为它需要双倍的时间。

Whenever I jump on a page by clicking on tab the page is fully postbacked twice. I dont understand whats the reason. That makes viewing reports cumbersome as it requires double time.

请访问 - http://softwaregenius.net/ivnew4 得到的想法。我不能给登录ID。

Please visit - http://softwaregenius.net/ivnew4 to get idea. I am not able to give loginid.

推荐答案

在Page指令autoeventwireup是真实的,你附加一个事件是OnInit喜欢的东西Page_Load中,这些事件将提高两倍,令它看上去像是双回发。它可以semething别的了。

When Page directive autoeventwireup is true and you attach an event OnInit to things like Page_Load, those events will be raised twice, making it look like double postback. It could be semething else, too.