是什么
<asp:Button id="button1" Text="Click me" runat="server" OnClick="submitEvent" />和
<input type="button" id="button1" runat="server" value="Click me" />是否与=服务器属性,输入有其他的或有限的属性和方法?
Does the input with runat="server" attribute has other or limited properties and methods?
感谢您!
推荐答案第一个创建了一个 System.Web.UI.WebControls.Button ,而第二个创建 System.Web.UI.HtmlControls.HtmlInputButton 。
The first one creates a System.Web.UI.WebControls.Button while the second one creates a System.Web.UI.HtmlControls.HtmlInputButton.
两者都是服务器控件,但在器WebControls 命名空间的控制一般具有比 HtmlControls 命名空间。通常情况下,他们把一些数据的ViewState 来保持自己的状态跟踪,他们有服务器端回发事件。
Both are server controls, but the controls in the WebControls namespace generally has a bit more functionality than the controls in the HtmlControls namespace. Typically they put some data in ViewState to keep track of their state, and they have server side postback events.
在 HtmlControls 命名空间的每个控制完全对应一个HTML元素,而在器WebControls 命名空间中的控件可能将取决于什么正在请求的页面,浏览器可以支持不同的渲染。
Each controls in the HtmlControls namespace correspond exactly to an HTML element, while the controls in the WebControls namespace may be rendered differently depending on what the browser that is requesting the page can support.
更多推荐
asp.net:;服务器&QUOT RUNAT =&QUOT之间的差额;和服务器控件
发布评论