So, I have this thing where I'm pulling a string of data from a table and I need to populate multiple controls some are in ASCX files and others are just textboxes on the page.
I'm putting the string into an array and splitting it on the "\t" tab delimiter.
But, after that, I'm stuck on how to put that data into all the controls.
var custId = rcbarchive.SelectedValue; var newCustId = Convert.ToInt32(custId); using (CP_McCain db = new CP_McCain()) { var dt = db.vdpCustomizationCollection.GetByPrimaryKey(newCustId); var vdpDataString = dt.VDPDataString; const char tabDelimiter = '\t'; string[] result = vdpDataString.Split(tabDelimiter); foreach (var oResult in result) { HeadlineTextTB.Text += oResult;//maybe? //this is where I get lost //need to find a control within an asxc file //and populate it. } }
Any help today would be greatly appreciated. Thanks, all.