为什么要使用AutoEventWireup =" true"在aspx页面?请用一些例子来描述。 [英] Why to use AutoEventWireup= "true" in aspx page? Please describe with some example.

查看:83
本文介绍了为什么要使用AutoEventWireup =" true"在aspx页面?请用一些例子来描述。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在页面属性中,我们编写了AutoEventWireup。它的含义是什么?

In the page attribute we write AutoEventWireup. What is its meaning??

推荐答案

看看这个:什么+是+ AutoEventWireup [ ^ ]


MSDN说:



MSDN says:

Quote:

当AutoEventWireup为true时,ASP.NET不要求您将事件处理程序显式绑定到页面事件(如Load)。

当AutoEventWireup为false时,您必须将事件显式绑定到方法。例如,如果页面代码中有Page_Load方法,则只有在编写代码时才会调用该方法以响应Load事件

When AutoEventWireup is true, ASP.NET does not require that you explicitly bind event handlers to a page event such as Load.
When AutoEventWireup is false, you must explicitly bind the event to a method. For example, if you have a Page_Load method in the code for a page, the method will be called in response to the Load event only if you write code





参考:



system.web.configuration.pagessection.autoeventwireup [ ^ ]



< a href =http://www.c-sharpcorner.com/uploadfile/puranindia/what-is-the-autoeventwireup-attribute-in-Asp-Net/> what-is-the-autoeventwireup-attribute-in- Asp-Net / [ ^ ]


这篇关于为什么要使用AutoEventWireup =&quot; true&quot;在aspx页面?请用一些例子来描述。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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