Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 AJAX 按钮和标签控件。当用户单击按钮时,标签中的数据会更新。
但是单击按钮后,会发生 Page_Load 事件,我不想要它,因为所有数据都被初始化为默认值。
如何在 Page_Load 事件中检查它是 AJAX 请求?
我使用 UpdatePanel 和 ScriptManager 作为 AJAX 工具。
在页面加载检查
if (!Page.IsAsync) { }