TextBox txt = new TextBox();
txt.ID = "txtStoreGroupList";
txt.Width = Unit.Percentage(100);
table.Rows[rowNum].Cells[3].Controls.Add(txt);
table.Rows[rowNum].Cells[3].Controls.Add(new LiteralControl("Type at least 2 characters of store group code"));
// watermark extender gives directions on adding store groups
AjaxControlToolkit.TextBoxWatermarkExtender twe = new AjaxControlToolkit.TextBoxWatermarkExtender();
twe.ID = "tweStoreGroupList";
twe.TargetControlID = "txtStoreGroupList";
twe.WatermarkText = "Begin typing store group code...";
table.Rows[rowNum].Cells[3].Controls.Add(twe);
// autocomplete extender enables lookup of store groups without loading all 8000+ onto page
AjaxControlToolkit.AutoCompleteExtender ace = new AjaxControlToolkit.AutoCompleteExtender();
ace.ID = "aceStoreGroupList";
ace.ServiceMethod = "GetStoreGroupCompletionList";
ace.ServicePath = "/_layouts/autocompleteservice.asmx";
ace.TargetControlID = "txtStoreGroupList";
ace.MinimumPrefixLength = 2;
ace.CompletionSetCount = 50;
ace.CompletionInterval = 300;
ace.EnableCaching = true;
table.Rows[rowNum].Cells[3].Controls.Add(ace);