Hi Liste,
ich hab hier ein Problemchen: Ich m�chte abh�ngig von einer
Dropdownauswahl ein UC dynamisch laden.
Leider vergisst meine Seite jetzt aber bei irgendeinem PostBack die
geladenen Controls ^^ kann man so was nicht irgendwie umgehen?
St�ckchen Source:
private void DropDownList1_SelectedIndexChanged(object sender,
System.EventArgs e)
{
Tools.LoadControl(this, AdBody,
DropDownList1.SelectedItem.Text.Trim() + ".ascx");
}
Class Tools:
public static void LoadControl(TemplateControl template,
Control target, string ControlName)
{
target.Controls.Add(template.LoadControl(ControlName));
}
Viele Gr��e,
Micha
*************************
_______________________________________________
This ASP.NET email is sponsored by:
UDEX ProMenu.Net - Die Software f�r Navigation - Jetzt kostenlos testen!
Tree- Style, Horizontal- Slide, Vertical- Slide. http://www.udexnet.com
_______________________________________________
Asp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net
*************************