Currently I want to generate a few rows in a table depending on the images I have stored in a location, only when I want to concatenate everything with a innerhtml
it is generated as text by the structure of the table.
This is seen in the browser element inspector
Table code:
public void btnOk_T_Onclick(object sender, EventArgs e)
{
DirectoryInfo d = new DirectoryInfo(@"C:\Users\Ned-Design\Documents\projects\NederaV4\Administrators\Temp");//Assuming Test is your Folder
FileInfo[] Files = d.GetFiles("*.png"); //Getting Text files
System.Web.UI.HtmlControls.HtmlGenericControl createDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("TABLE");
createDiv.ID = "createTable";
foreach (FileInfo file in Files)
{
//createDiv.ID = "createDivM";
//createDiv.InnerHtml = " <img src=Temp" + "\" + file.Name + " style='width:100%;margin-top:2%'> ";
//this.Controls.Add(createDiv);
//createDiv.Attributes["class"] = "col-md-4";
createDiv.InnerHtml +="<tr>< td ></ td >< td ></ td >< td ></ td >< td ></ td >< td ></ td > < td ></ td ></ tr >";
conta++;
}
this.Controls.Add(createDiv);
}