J
John
I am trying to get a control to insert into the HTML content for a page
which comes from our database. At the point I have a tag for the component I
want to add which is contained inside the HTML. I have tried to insert the
control into a placeholder with no joy. I want to have something similar to
DotNetNukes way of adding content to a page.
Does anyone have any ideas how to do this or where I'm going wrong?
What I have so far : (there are no errors it just doesnt appear)
PlaceHolder LanguageBarPlaceHolder2;
protected void Page_Load(object sender, EventArgs e)
{
LanguageBarPlaceHolder2 = new PlaceHolder();
Literal1.Text = "<html><body><div>";
Literal1.Text += @"<asplaceHolder ID=""LanguageBarPlaceHolder2""
runat=""server""></asplaceHolder>";
Literal1.Text += "Test</div></html></body>";
LanguageBarPlaceHolder2.Controls.Add(LoadControl("~/Controls/LanguageBar.ascx"));
}
which comes from our database. At the point I have a tag for the component I
want to add which is contained inside the HTML. I have tried to insert the
control into a placeholder with no joy. I want to have something similar to
DotNetNukes way of adding content to a page.
Does anyone have any ideas how to do this or where I'm going wrong?
What I have so far : (there are no errors it just doesnt appear)
PlaceHolder LanguageBarPlaceHolder2;
protected void Page_Load(object sender, EventArgs e)
{
LanguageBarPlaceHolder2 = new PlaceHolder();
Literal1.Text = "<html><body><div>";
Literal1.Text += @"<asplaceHolder ID=""LanguageBarPlaceHolder2""
runat=""server""></asplaceHolder>";
Literal1.Text += "Test</div></html></body>";
LanguageBarPlaceHolder2.Controls.Add(LoadControl("~/Controls/LanguageBar.ascx"));
}