using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Controls_SearchBox : WebBlockUserControl { private string _TextBoxCssClass = null; public string TextBoxCssClass { get { return _TextBoxCssClass; } set { _TextBoxCssClass = value; } } private string _ButtonImageUrl = null; public string ButtonImageUrl { get { return _ButtonImageUrl; } set { _ButtonImageUrl = value; } } protected void Page_Load(object sender, EventArgs e) { if (_ButtonImageUrl == null) { ibSearch.Visible = false; btnSearch.Visible = true; pnlSearch.DefaultButton = btnSearch.ID; btnSearch.OnClientClick = "hardSearch('" + WebBlockPage.RelativePath + "',document.getElementById('" + this.ClientID + "txt').value); return false;"; } else { ibSearch.Visible = true; btnSearch.Visible = false; pnlSearch.DefaultButton = ibSearch.ID; ibSearch.OnClientClick = "hardSearch('" + WebBlockPage.RelativePath + "',document.getElementById('" + this.ClientID + "txt').value); return false;"; } } }