protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { foreach (var item in DataSourceProvider.GetProviderList()) { ddlDataSource.Items.Add(new ListItem(item.FriendlyName)); } foreach (DataSourceConfigurator conf in phConfigurator.Controls) { conf.Visible = ddlDataSource.SelectedValue == conf.ID; } TemplateEditorUtils.TemplateDataBind("Widgets", ddlTemplate, PortalId, LocalResourceFile, Server); TemplateEditorUtils.FileDataBind("Widgets", ddlTemplate, ddlFile, PortalId, LocalResourceFile, Server); } } catch (Exception exc) // Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } }