G
Guest
I'm trying to dynamically create controls on a <DIV>; however I want to add
an <HR> in between certain controls, seems simple enough. I'm having trouble
with the <HR>, I was going to just add it using InnerHtml.Insert; but for
some reason after adding a control, the InnerHtml seems to get corupted,
<error: an exception of type: {System.Web.HttpException} occurred>.
Here's basically what I want to do, content is the <DIV> and the control I'm
adding is a user control.
Control empNominator = null;
empNominator = LoadControl("EmployeeRecordReadOnly.ascx");
if (empNominator != null)
{
((EmployeeRecordReadOnly)empNominator).EmployeeType = "NR";
((EmployeeRecordReadOnly)empNominator).UpdateEmployeeControlsFromData(DataSet1);
content.Controls.Add(((EmployeeRecordReadOnly)empNominator));
content.InnerHtml.Insert(content.InnerHtml.Length, "<HR style=\"HEIGHT:
1px\" width=\"100%\" SIZE=\"1\">");
}
Any ideas?
an <HR> in between certain controls, seems simple enough. I'm having trouble
with the <HR>, I was going to just add it using InnerHtml.Insert; but for
some reason after adding a control, the InnerHtml seems to get corupted,
<error: an exception of type: {System.Web.HttpException} occurred>.
Here's basically what I want to do, content is the <DIV> and the control I'm
adding is a user control.
Control empNominator = null;
empNominator = LoadControl("EmployeeRecordReadOnly.ascx");
if (empNominator != null)
{
((EmployeeRecordReadOnly)empNominator).EmployeeType = "NR";
((EmployeeRecordReadOnly)empNominator).UpdateEmployeeControlsFromData(DataSet1);
content.Controls.Add(((EmployeeRecordReadOnly)empNominator));
content.InnerHtml.Insert(content.InnerHtml.Length, "<HR style=\"HEIGHT:
1px\" width=\"100%\" SIZE=\"1\">");
}
Any ideas?