/// <summary> /// Executes the page initialization event. /// </summary> /// <param name="e">The event arguments.</param> protected override void OnInit(EventArgs e) { base.OnInit(e); SearchButton.Click += SearchButtonClick; HardwareList.ItemDataBound += ListItemDataBound; PremiumUpload.UploadComplete += UploadComplete; NoResultsMessage.Visible = false; PremiumUploadSuccess.Visible = false; PremiumUploadError.Visible = false; jQuery.RequestDnnPluginsRegistration(); HardwareList.DataSource = DataProvider.HardwareProperties; SoftwareList.DataSource = DataProvider.SoftwareProperties; BrowserList.DataSource = DataProvider.BrowserProperties; ContentList.DataSource = DataProvider.ContentProperties; HardwareList.DataBind(); SoftwareList.DataBind(); BrowserList.DataBind(); ContentList.DataBind(); var refreshButtonText = LocalizeString("StatsRefreshButton.Text"); var statsHtml = LocalizeString("StatsHtml.Text"); PremiumStats.RefreshButtonText = refreshButtonText; PremiumStats.Html = statsHtml; PremiumUpload.UploadButtonText = LocalizeString("UploadData.Text"); LiteStats.RefreshButtonText = refreshButtonText; LiteStats.Html = statsHtml; if (!IsPremium) { // lite Activate.ActivateButtonText = LocalizeString("ActivateButtonText.Text"); Activate.ActivatedMessageHtml = LocalizeString("ActivatedMessageHtml.Text"); Activate.ActivateInstructionsHtml = LocalizeString("ActivateInstructionsHtml.Text"); Activate.ActivationDataInvalidHtml = LocalizeString("ActivationDataInvalidHtml.Text"); Activate.ActivationFailureCouldNotUpdateConfigHtml = LocalizeString("ActivationFailureCouldNotUpdateConfigHtml.Text"); Activate.ActivationFailureCouldNotWriteDataFileHtml = LocalizeString("ActivationFailureCouldNotWriteDataFileHtml.Text"); Activate.ActivationFailureCouldNotWriteLicenceFileHtml = LocalizeString("ActivationFailureCouldNotWriteLicenceFileHtml.Text"); Activate.ActivationFailureGenericHtml = LocalizeString("ActivationFailureGenericHtml.Text"); Activate.ActivationFailureHttpHtml = LocalizeString("ActivationFailureHttpHtml.Text"); Activate.ActivationFailureInvalidHtml = LocalizeString("ActivationFailureInvalidHtml.Text"); Activate.ActivationStreamFailureHtml = LocalizeString("ActivationStreamFailureHtml.Text"); Activate.ActivationSuccessHtml = LocalizeString("ActivationSuccessHtml.Text"); Activate.ValidationFileErrorText = LocalizeString("ValidationFileErrorText.Text"); Activate.ValidationRequiredErrorText = LocalizeString("ValidationRequiredErrorText.Text"); Activate.ValidationRegExErrorText = LocalizeString("ValidationRegExErrorText.Text"); Activate.RefreshButtonText = LocalizeString("RefreshButtonText.Text"); Activate.UploadButtonText = LocalizeString("UploadButtonText.Text"); Activate.UploadInstructionsHtml = LocalizeString("UploadInstructionsHtml.Text"); } else { // premium DeviceExplorer.BackButtonDeviceText = LocalizeString("BackButtonDeviceText.Text"); DeviceExplorer.BackButtonDevicesText = LocalizeString("BackButtonDevicesText.Text"); DeviceExplorer.DeviceExplorerDeviceHtml = LocalizeString("DeviceExplorerDeviceInstructionsHtml.Text"); DeviceExplorer.DeviceExplorerModelsHtml = LocalizeString("DeviceExplorerModelsInstructionsHtml.Text"); DeviceExplorer.DeviceExplorerVendorsHtml = LocalizeString("DeviceExplorerVendorsHtml.Text"); } if (IsPostBack) { return; } var vendor = Request.QueryString["Vendor"]; var model = Request.QueryString["Model"]; var deviceId = Request.QueryString["DeviceID"]; var searchQuery = Request.QueryString["Query"]; var hasVendor = !string.IsNullOrEmpty(vendor); var hasModel = !string.IsNullOrEmpty(model); var hasDeviceId = !string.IsNullOrEmpty(deviceId); var hasSearchQuery = !string.IsNullOrEmpty(searchQuery); if (hasVendor) { DeviceExplorer.Vendor = vendor; } if (hasModel) { DeviceExplorer.Model = model; } if (hasDeviceId) { DeviceExplorer.DeviceID = deviceId; } if (hasSearchQuery) { SearchTextBox.Text = Server.UrlDecode(searchQuery); } NoResultsMessage.Visible = hasSearchQuery && !hasDeviceId && !hasModel && !hasVendor; }
protected void LoadContentByCategory(string category) { ContentList.DataSource = _cm.GetContentByCategory(category); ContentList.DataBind(); }