在ASP.NET两次回传 [英] Twice postback in ASP.NET

查看:110
本文介绍了在ASP.NET两次回传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的页面是两次完全回发。我使用的母版页使用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.

这篇关于在ASP.NET两次回传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆