private void GetSearchParameter() { try { string SearchKey = string.Empty; #region "Get Data From Form Page" foreach (Control ctl in pnlSearchWord.Controls) { if (ctl.HasControls()) { foreach (Control mctl in ctl.Controls) { if (mctl.HasControls()) { foreach (Control nctl in mctl.Controls) { if (nctl.GetType() == typeof(TextBox)) { TextBox txtSearch = (TextBox)nctl; if (txtSearch != null) { SearchKey = txtSearch.Text.Trim(); break; } } } } } } } #endregion //Remove unwanted html text from the Search text SearchKey = RemoveUnwantedSearchText(SearchKey); SageFrameSearch SFS = new SageFrameSearch(); if (SFS.CheckIgnorWords(SearchKey, GetCurrentCultureName)) { //Call Search function to get result if (SearchKey != string.Empty) { SearchData(SearchKey); } else { ShowMessage(SageMessageTitle.Notification.ToString(), GetSageMessage("SageFrameSearch", "PleaseFillValidTextToSearch"), "", SageMessageType.Alert); } } else { ShowMessage(SageMessageTitle.Notification.ToString(), GetSageMessage("SageFrameSearch", "PleaseFillValidTextToSearch"), "", SageMessageType.Alert); } } catch (Exception ex) { ProcessException(ex); } }