1 using System;
2 using System.Data;
3 using System.Configuration;
4 using System.Collections;
5 using System.Collections.Specialized;
6 using System.Linq;
7 using System.Web;
8 using System.Web.Security;
9 using System.Web.UI;
10 using System.Web.UI.WebControls;
11 using System.Web.UI.WebControls.WebParts;
12 using System.Web.UI.HtmlControls;
13 using System.Xml.Linq;
14 using System.Web.DynamicData;
15 
16 public partial class Text_EditField : System.Web.DynamicData.FieldTemplateUserControl {
Page_Load(object sender, EventArgs e)17     protected void Page_Load(object sender, EventArgs e) {
18         TextBox1.MaxLength = Column.MaxLength;
19         if (Column.MaxLength < 20)
20             TextBox1.Columns = Column.MaxLength;
21         TextBox1.ToolTip = Column.Description;
22 
23         SetUpValidator(RequiredFieldValidator1);
24         SetUpValidator(RegularExpressionValidator1);
25         SetUpValidator(DynamicValidator1);
26     }
27 
ExtractValues(IOrderedDictionary dictionary)28     protected override void ExtractValues(IOrderedDictionary dictionary) {
29         dictionary[Column.Name] = ConvertEditedValue(TextBox1.Text);
30     }
31 
32     public override Control DataControl {
33         get {
34             return TextBox1;
35         }
36     }
37 }
38