private void GridSearch()
        {
            lblException.Visible = false;
            string txtSearchValue = txtSearch.Text.ToLower();
            int    length         = txtSearchValue.Length;

            try
            {
                if (length >= 3)
                {
                    DAL = new DataAccessLayer();
                    DataTable dtbl     = DAL.GetSearchPolls(ddlSearch.SelectedValue, txtSearch.Text);
                    int       countrow = dtbl.Rows.Count;
                    if (countrow == 0)
                    {
                        lblSearchError.Visible   = true;
                        lblSearchError.Text      = "No Records Found";
                        lblSearchError.ForeColor = System.Drawing.Color.Red;
                        gvPolls.Visible          = false;
                        lblException.Visible     = false;
                    }
                    else
                    {
                        lblSearchError.Visible = false;
                        gvPolls.Visible        = true;
                        gvPolls.DataSource     = dtbl;
                        gvPolls.DataBind();

                        DropDownList ddl = gvPolls.FooterRow.FindControl("ddlPollRoleFooter") as DropDownList;

                        List <ListItem>             Role_Names = new List <ListItem>();
                        Dictionary <string, string> list       = DAL.GetRoleName();
                        foreach (KeyValuePair <string, string> entry in list)
                        {
                            Role_Names.Add(new ListItem(entry.Key, entry.Value.ToString()));
                        }
                        ddl.Items.AddRange(Role_Names.ToArray());
                    }
                }
                else
                {
                    lblErrorMessage.Visible  = false;
                    lblSearchError.Visible   = true;
                    lblSearchError.Text      = "Please enter minimum 3 characters";
                    lblSearchError.ForeColor = System.Drawing.Color.Red;
                    lblException.Visible     = false;
                }
            }
            catch (Exception ex)
            {
                lblErrorMessage.Visible   = true;
                lblErrorMessage.Text      = "Search Exception: " + ex.Message;
                lblErrorMessage.ForeColor = System.Drawing.Color.Red;
            }
        }