ASP.NET - 常见的问题 [英] ASP.NET - Common Gotchas

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

问题描述

当我与ASP.NET工作,我发现总有意想不到的事情我碰上了好长时间才调试。我想,有这些的综合清单将为那些奇怪的错误的情况下是巨大的,再加以扩大我们带来不适的知识平台。

When I am working with ASP.NET, I find that there are always unexpected things I run into that take forever to debug. I figure that having a consolidated list of these would be great for those "weird error" circumstances, plus to expand our knowledge of oddness in the platform.

所以:答案与你的疑难杂症S有一个

So: answer with one of your "Gotcha"s!

我将开始:
在ASP.NET(VB),一个try / catch块中执行的Response.Redirect不会停止当前的响应,这可能会导致对同一会话执行两个并发响应的执行。

I'll start: Under ASP.NET (VB), performing a Response.Redirect inside a try/catch block does not stop execution of the current Response, which can lead to two concurrent Responses executing against the same Session.

推荐答案

页面init事件之后不要动态添加控件,因为它会搞砸了视图状态树。

Don't dynamically add controls after the page init event as it will screw up the viewstate tree.

这篇关于ASP.NET - 常见的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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