Hi,
I have what is probably a basic question but I do not understand if/why there is a difference. I have a simple asp.net page with a staticly created DropDownList and Panel control. The user can select one of three options if the drop down (Employee, Company, Address) which should load the respective custom UserControl into the panel below. By default, I have the Employee control selected in the drop down and it should be displayed on the intial Page Load (!Page.IsPostBack).
If I do the following it performs the desired behavior on the intial load:
protected void Page_Load(object sender, EventArgs e)
{
PanelAjax.Controls.Clear();
if (!Page.IsPostBack)
PanelAjax.Controls.Add(LoadControl(@"Controls\Employee.ascx"));
}
If I try the following, the User Control does not appear on the initial page load:
pro ...
Go to the complete details ...