This article is a follow-up of the overall design concept of Asp.net 2.0 functional experience Article
Hiddenfield is now available as a formal control under the System. Web. UI. webcontrols naming control. With the new data binding technology in ASP. net2.0. For example, the editing template for the article in the sample Website is shown in:
The example URL is as follows:
Http://www.keyss.cn/admin/basismodule/article/article.aspx
As you can see, I put three hiddenfields in formview so that I don't want to read the data again when the data source control updates the data, none of the three fields should be provided for user editing. Therefore, this is the best time to use hiddenfield.
However, you can use reflector to viewSource codeIt is found that it is inherited from system. Web. UI. Control and does not support data verification and is generated by its client.CodeIt is also from the input mark. In general sense, it is easy to implement verification. Of course, in general, invisible controls do not need to be verified, but in some cases, verification is still necessary, for example, I have developed a large text editing Control for editing the content of an article. This control does not have a visual editing interface on the home page, when the icon button is clicked, an HTML editor is displayed. When it is closed and saved, the edited content is stored in a hidden domain on the home page. When the record is saved, I also hope to trigger verification. To solve this problem, I have developed a new hiddenfield control that supports verification, the control inherits a new big text editor control to implement the desired function. I hope Microsoft will make some adjustments to some controls in the future.