HTML Controls->ASP.NET HtmlInputHidden Control
2007-03-26 15:22
441 查看
Definition and Usage
The HtmlInputHidden control is used to control an <input type="hidden"> element. In HTML, this element is used to create a hidden input field.Properties and Events
Property | Description |
---|---|
Attributes | Returns all attribute name and value pairs of the element |
Disabled | A Boolean value that indicates whether or not the control should be disabled. Default is false |
id | A unique id for the element |
Name | The name of the element |
runat | Specifies that the element is a server control. Must be set to "server" |
Style | Sets or returns the CSS properties that are applied to the control |
TagName | Returns the element tag name |
Type | The type of the element |
Value | The value of the hidden field |
Visible | A Boolean value that indicates whether or not the control should be visible |
Event | Description |
---|---|
ServerChange | When the content of the element has changed |
Examples
HTMLInputHiddenASPX Source:
<script runat="server"> Sub submit(Source As Object, e As EventArgs) hidden1.Value=string1.Value p1.InnerHtml="Hidden value= " + hidden1.Value End Sub </script> <html> <body> <form runat="server"> Enter some text: <input id="string1" type="text" size="25" runat="server" /> <input type="submit" value="Submit" OnServerClick="submit" runat="server" /> <input id="hidden1" type="hidden" runat="server" /> <p id="p1" runat="server" /> </form> </body> </html> |
Enter some text: |
IF you enter the text "shaohai" into the text box ,it will shows:
Enter some text: Hidden value= shaohai |
相关文章推荐
- HTML Controls->ASP.NET HtmlInputFile Control
- HTML Controls->ASP.NET HtmlInputRadioButton Control
- HTML Controls->ASP.NET HtmlTextArea Control
- HTML Controls->ASP.NET HtmlInputButton Control
- HTML Controls->ASP.NET HtmlInputText Control
- HTML Controls->ASP.NET HtmlInputCheckBox Control
- [转载]asp.net mvc: why is Html.CheckBox generating an additional hidden input
- HTML Controls->ASP.NET HtmlImage Control
- HTML Controls->ASP.NET HtmlInputImage Control
- asp.net 从后台得到htmlinput的值的两种方式
- asp.net 通过HtmlInputFile控件上传文件的类
- HTML Controls->ASP.NET HtmlButton Control
- Displaying multiple columns in a HTML Listbox Control in ASP.Net
- 创建符合标准的、有语意的HTML页面——ASP.NET 2.0 CSS Friendly Control Adapters 1.0发布
- asp.net HtmlInputFile属性
- ASP.NET MVC CheckBoxFor为什么会生成hidden input控件
- ASP.NET HtmlInputCheckBox 控件
- HTML <input type="file">上传文件——结合asp.net的一个文件上传示例
- How to make text of an html checkbox clickable (like ASP.NET control)
- [置顶] 【Asp.net】前台的Html控件向后台传值以及前台的html的input按钮如何调用后台的方法