protected void Page_Load(Object sender, EventArgs e) { if (!Page.IsPostBack) { ClientAPI.RegisterKeyCapture(this.txtSearch, this.cmdSearch, '\r'); if (Request.QueryString["Search"] != null) { txtSearch.Text = Server.HtmlEncode(Request.QueryString["Search"].ToString()); } if (!String.IsNullOrEmpty(Submit)) { if (Submit.IndexOf("src=") != -1) { Submit = Submit.Replace("src=\"", "src=\"" + PortalSettings.ActiveTab.SkinPath); } } else { Submit = Localization.GetString("Search", Localization.GetResourceFile(this, MyFileName)); } cmdSearch.Text = Submit; if (!String.IsNullOrEmpty(CssClass)) { cmdSearch.CssClass = CssClass; } } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="e">The <see cref="System.EventArgs" /> instance containing the event data.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); Framework.jQuery.RegisterDnnJQueryPlugins(this.Page); Framework.ServicesFramework.Instance.RequestAjaxAntiForgerySupport(); ClientResourceManager.RegisterStyleSheet(Page, "~/Resources/Search/SearchSkinObjectPreview.css"); ClientResourceManager.RegisterScript(Page, "~/Resources/Search/SearchSkinObjectPreview.js"); cmdSearch.Click += CmdSearchClick; cmdSearchNew.Click += CmdSearchNewClick; if (!Page.IsPostBack) { if (MinCharRequired == 0) { MinCharRequired = 2; } if (AutoSearchDelayInMilliSecond == 0) { AutoSearchDelayInMilliSecond = 400; } PortalId = PortalSettings.ActiveTab.IsSuperTab ? PortalSettings.PortalId : -1; if (!String.IsNullOrEmpty(Submit)) { if (Submit.IndexOf("src=", StringComparison.Ordinal) != -1) { Submit = Submit.Replace("src=\"", "src=\"" + PortalSettings.ActiveTab.SkinPath); Submit = Submit.Replace("src='", "src='" + PortalSettings.ActiveTab.SkinPath); } } else { Submit = Localization.GetString("Search", Localization.GetResourceFile(this, MyFileName)); } cmdSearch.Text = Submit; cmdSearchNew.Text = Submit; if (!String.IsNullOrEmpty(CssClass)) { WebRadioButton.CssClass = CssClass; SiteRadioButton.CssClass = CssClass; cmdSearch.CssClass = CssClass; cmdSearchNew.CssClass = CssClass; } } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs" /> instance containing the event data.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); // load dnn.jquery library for customising radiobutton DotNetNuke.Framework.jQuery.RegisterDnnJQueryPlugins(this.Page); cmdSearch.Click += cmdSearch_Click; cmdSearchNew.Click += cmdSearchNew_Click; if (!Page.IsPostBack) { ClientAPI.RegisterKeyCapture(txtSearch, cmdSearch, 13); ClientAPI.RegisterKeyCapture(txtSearchNew, cmdSearchNew, 13); if (!String.IsNullOrEmpty(Submit)) { if (Submit.IndexOf("src=") != -1) { Submit = Submit.Replace("src=\"", "src=\"" + PortalSettings.ActiveTab.SkinPath); Submit = Submit.Replace("src='", "src='" + PortalSettings.ActiveTab.SkinPath); } } else { Submit = Localization.GetString("Search", Localization.GetResourceFile(this, MyFileName)); } cmdSearch.Text = Submit; cmdSearchNew.Text = Submit; if (!String.IsNullOrEmpty(CssClass)) { WebRadioButton.CssClass = CssClass; SiteRadioButton.CssClass = CssClass; cmdSearch.CssClass = CssClass; cmdSearchNew.CssClass = CssClass; } if (Request.QueryString["Search"] != null) { txtSearch.Text = Request.QueryString["Search"]; txtSearchNew.Text = Request.QueryString["Search"]; } } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs" /> instance containing the event data.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); txtSearch.Attributes.Add("placeholder", Localization.GetString("Search", Localization.GetResourceFile(this, MyFileName))); cmdSearch.Click += cmdSearch_Click; cmdSearchNew.Click += cmdSearchNew_Click; if (!Page.IsPostBack) { ClientAPI.RegisterKeyCapture(txtSearch, cmdSearch, 13); ClientAPI.RegisterKeyCapture(txtSearchNew, cmdSearchNew, 13); if (!String.IsNullOrEmpty(Submit)) { if (Submit.IndexOf("src=") != -1) { Submit = Submit.Replace("src=\"", "src=\"" + PortalSettings.ActiveTab.SkinPath); Submit = Submit.Replace("src='", "src='" + PortalSettings.ActiveTab.SkinPath); } } else { Submit = Localization.GetString("Search", Localization.GetResourceFile(this, MyFileName)); } //cmdSearch.Text = Submit; cmdSearchNew.Text = Submit; if (!String.IsNullOrEmpty(CssClass)) { WebRadioButton.CssClass = CssClass; SiteRadioButton.CssClass = CssClass; cmdSearch.CssClass = CssClass; cmdSearchNew.CssClass = CssClass; } if (Request.QueryString["Search"] != null) { txtSearch.Text = Request.QueryString["Search"]; txtSearchNew.Text = Request.QueryString["Search"]; } } }