protected void RepeaterDetails_ItemDataBound(object sender, RepeaterItemEventArgs e) { try { foreach (Control ri in RepeaterDetails.Items) { //if (ri.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) //{ Label lblDatatype = (Label)e.Item.FindControl("lblDatatype"); if (lblDatatype.Text != null) { if (lblDatatype.Text.ToLower() == "list") { PlaceHolder RepeaterPanel = (PlaceHolder)e.Item.FindControl("RepeaterPanel"); DropDownList ddl = new DropDownList(); ddl.Width = 150; RepeaterPanel.Controls.Add(ddl); i++; break; } else { PlaceHolder RepeaterPanel = (PlaceHolder)e.Item.FindControl("RepeaterPanel"); tbx = new TextBox(); tbx.ID = "TextBox" + i; tbx.Width = 150; RepeaterPanel.Controls.Add(tbx); i++; break; } } // } } } catch { } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)