ASP.net 3.5 control and Component Development Technology series-Developing server controls from scratch (bottom)

Source: Internet
Author: User

The Textboxheight property is primarily used to set the height of the child control textbox that displays the value. Similar to the Labelheight function.

/// <summary>
/// 获得本书更多内容,请看:
/// http://blog.csdn.net/ChengKing/archive/2008/08/18/2792440.aspx
/// </summary>
private Unit unitTextBoxHeight = Unit.Empty;
[Category("LabelTextBox")]
[Description("文本框宽度")]
public Unit TextBoxHeight
{
   get
   {
     this.EnsureChildControls();
     return this.tb.Height;
   }
   set
   {
     this.EnsureChildControls();
     this.tb.Height = value;
   }
}

The Validateexpression property is primarily used to set the validation expression for the validation child control, and the property value is a string type. This is to expose the validation child control interface directly to the field control, for example, if you want to validate a field that represents the input message, you can set the value to: "\w+" ([-+.] \w+) *@\w+ ([-.] \w+) * \.\w+ ([-.] \w+) * "(indicates the regular expression of an e-mail) to verify that the user input value is a legitimate e-mail format. Validation expression does not belong to the content of this book to introduce, General ASP. NET related books will be introduced.

/// <summary>
/// 获得本书更多内容,请看:
/// http://blog.csdn.net/ChengKing/archive/2008/08/18/2792440.aspx
/// </summary>
[Category("LabelTextBox")]
[Description("验证表达式")]
public string ValidateExpression
{
   get
   {
     this.EnsureChildControls();
     return this.rev.ValidationExpression;
   }
   set
   {
     this.EnsureChildControls();
     this.rev.ValidationExpression = value;
   }
}

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.