Use Htmlhelper to create a TextBox,
The following uses the HtmlHelper help class to create a text box.
Create an object class as follows:
Using System; using System. collections. generic; using System. linq; using System. web; namespace
Using ASP. net mvc as a website, the most common extension is probably html. textbox extension, but in some specific circumstances, its behavior may not be what you expected. Let's take a look at this specific situation.
To illustrate the problem,
The text box is created below through the HtmlHelper help class.First create a new entity class, as the following example:Using system;using system.collections.generic;using system.linq;using system.web;namespace mvcrestartlearnning.models{public
The TextBox Control is used to create a text box for users to enter text. The properties and features of TextBox are listed in our web Control Reference Manual. The following example demonstrates some attributes of the TextBox Control that you may
The TextBox control is used to create a text box for users to enter text.The properties and features of TextBox are listed in our web control Reference Manual.The following example demonstrates some attributes of the TextBox control that you may use:
@Html. TextBox ("User"""new "); The maximum number of input characters to limit text is 10@Html. TextBox ("users", "",new {@class ="l-text ", style="width:186px; "}) Specify the width of textthe usage in//ligerui is as follows: (set UI via
① During web development, you may also encounter problems that I encountered before. When using the Textbox Control, the edge of the control cannot be completely overwritten by the background image. 1:
After textbox resolution, it is also an
The enableviewstate attribute of the page object is false, meaning that the viewstate of the entire page (including all server-side controls) is disabled, however, does not disappear. viewstate does not work at this time.
The text content of
Php replaces textbox carriage return with html line feed code. The source of MailBody is sometimes the text content in TextBox. However, if you do not process the text content, the text will not have any format, and it will be squeezed together and
Generally, if the cursor field does not need to be used, the readonly encoding of textbox is set to true. However, after this setting, if Javascript is used to change the textbox value on the client side, this value cannot be used to control the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.