I am using Master pages for my ASP.NET website and in one of the content pages I upload a file which requires a bigger timeout value than the default 90 seconds. For other content pages I want to leave the default timeout value as it is.
我在我的ASP.NET网站上使用母版页,在我上传文件的一个内容页面中,该文件需要比默认值90秒更大的超时值。对于其他内容页面,我想保留默认的超时值。
Is it possible to set the timeout just for a specific content page? I checked the ScriptManagerProxy component, but it doesn't have a AsyncPostBackTimeout property.
是否可以为特定内容页面设置超时?我检查了ScriptManagerProxy组件,但它没有AsyncPostBackTimeout属性。
1 个解决方案
#1
14
You should be able to set it in your code-behind in the Page_Load event:
您应该能够在Page_Load事件中的代码隐藏中设置它:
protected void Page_Load(object sender, EventArgs e) {
ScriptManager.GetCurrent(this).AsyncPostBackTimeout = 300;
}
#1
14
You should be able to set it in your code-behind in the Page_Load event:
您应该能够在Page_Load事件中的代码隐藏中设置它:
protected void Page_Load(object sender, EventArgs e) {
ScriptManager.GetCurrent(this).AsyncPostBackTimeout = 300;
}