This page is to retrieve data and display in the page and enable user to edit the info.
at this moment i need to retrieve the data and display it in textbox.
as i also have to retrieve multiple data from data and display on each different text box.
my .cs code is as follows:
foreach (DataRow dr in ChildImageDT.Rows)
{
myImage = new Images();
myImage.DateTaken = DateTime.Parse(dr["image_taken_dt"].ToString());
myImage.PlaceTaken = dr["image_taken_loc"].ToString();
myImage.DetailedInfo = dr["image_info"].ToString();
tableString += "<tr><td>Date Taken:</td>";
tableString += "<td><asp:TextBox ID=\"txtDateOfBirth\">" + myImage.DateTaken + "</asp:TextBox>";
tableString += "<asp:CalendarExtender ID=\"CalendarExtender1\" runat=\"server\" CssClass=\"AjaxCalendar\"";
tableString += "PopupButtonID=\"imgCalendar\" PopupPosition=\"Right\" TargetControlID=\"txtDateOfBirth\" Format=\"MM/dd/yyyy\"></asp:CalendarExtender>";
**tableString += "<asp:TextBoxWatermarkExtender ID=\"TextBoxWatermarkExtender1\" runat=\"server\" TargetControlID=\"txtDateOfBirth\" WatermarkText=\"Month/Day/Year\" WatermarkCssClass=\"watermarked\"></asp:TextBoxWatermarkExtender>";**
tableString += "<asp:Image ID=\"imgCalendar\" runat=\"server\" ImageUrl=\"img/Button/calendar.png\" Width=\"20px\" /></td>";
**tableString += "<td rowspan=3 ><input type=\"button\" class=\"right_content\" title=\"" + " " + "\"";
tableString += "onClick =\"location.href='ViewProfile.aspx?cid=" + "" + "'\" ";
tableString += "style=\"background-size:100%; background:url('/img/missing%20children%20pictures/";**
tableString += "" + ".jpg')\"/></td></tr>";
tableString += "<tr><td>Place Taken:</td>";
**tableString += "<td>" + textbox1.Text = myImage.PlaceTaken;**
tableString += "</td><td></td></tr>";
tableString += "<tr><td rowspan=3>Detailed Info:</td>";
tableString += "<td rowspan=3><input id=\"txtImageDetailedInfo\" type=\"text\">" + myImage.DetailedInfo + "</input></td><td></td></tr>";
tableString += "<tr><td><input id=\"SetProfilePicture\" type=\"radio\" /></td></tr>";
tableString += "<tr><td><input id=\"DeletePhoto\" type=\"checkbox\" /></td></tr>";
}
the page should look like this :
where each photo as it own description and i need to retrieve all the images and data from

string +=in this manner murders the performance. UseStringBuilderfor any significant text building.string.Format, it might save you some headaches further down the way.