troubleshooting Question

ASP Panel Behaviour - no error

Avatar of G0ggy
G0ggyFlag for United Kingdom of Great Britain and Northern Ireland asked on
ASP.NET.NET ProgrammingC#
5 Comments1 Solution892 ViewsLast Modified:
Hi guys,

I've got no error message to show you as the program is not erroring, but my asp panel (pnlUploadFurtherDetails) is not being show when I click edit in the GridView.

Can you see why? I've been staring at this for a day now and stepping through and cannot see why it is not being shown!

ASPX page:

<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" 
    CodeBehind="PubBanners.aspx.cs" Inherits="The1440.Admin.PubBanners" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Main_Head" runat="server">
    <link rel="Stylesheet" type="text/css" href="../Styles/main.css" />
    <link rel="Stylesheet" type="text/css" href="../Styles/Forms.css" />
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="server">
    <asp:UpdateProgress ID="upProgress1" AssociatedUpdatePanelID="upBannersForm" runat="server">
        <ProgressTemplate>
            <p>
                <asp:Image ID="imgAjaxLoader" ImageUrl="~/Images/Master/ajax-loader.gif" runat="server" />
            </p>
        </ProgressTemplate>
    </asp:UpdateProgress>
    
    <asp:UpdatePanel ID="upBannersForm" runat="server">
    <Triggers>
        <asp:PostBackTrigger ControlID="btnUploadFile" />
    </Triggers>

    <ContentTemplate>
        <div class="form">            
            <div style="width: 400px; float: left">
                <h2><asp:Label ID="lblPageSubTitle" Text="Pub Banners" runat="server"></asp:Label></h2>
                <p>
                    <asp:Label ID="lblMessages" runat="server"></asp:Label>
                </p>
            </div>

            <div style="width: 450px; float: left; text-align: right;">
                <asp:Panel ID="pnlCommandButtons" Visible="false" runat="server">
                    <asp:Button ID="btnUploadNewBanner" Text="Upload New Banner" OnClick="btnUploadNewBanner_Click" Height="33" runat="server" />
                    &nbsp;
                    <asp:Button ID="btnSelectDiffPub" Text="Select Different Venue" OnClick="btnSelectDiffPub_Click" Height="33" runat="server" />
                </asp:Panel>
            </div>

            <br style="clear: both;">

            <asp:Panel ID="pnlAddBanner" Visible="false" runat="server">
                <p>
                    <label for="fuBanner">Upload Banner</label>
                    <asp:FileUpload ID="fuBanner" runat="server" />
                    <asp:Button ID="btnUploadFile" Text="Upload File" OnClick="btnUploadFile_Click" runat="server" />
                    <asp:LinkButton ID="btnCancelUpload" Text="or Cancel" OnClick="btnCancelUpload_Click" runat="server"></asp:LinkButton>
                </p>                
            </asp:Panel>

            <asp:Panel ID="pnlUploadFurtherDetails" Visible="false" runat="server">                               
                <p>
                    <label for="ddlPage">Page <span>(Required)</span></label>
                    <asp:DropDownList ID="ddlPage" ValidationGroup="add" CssClass="select" runat="server">
                        <asp:ListItem Text="-- select --" Value="0" Selected="True"></asp:ListItem>
                        <asp:ListItem Text="Venue" Value="venue"></asp:ListItem>
                        <asp:ListItem Text="Home" Value="home"></asp:ListItem>
                        <asp:ListItem Text="Offers" Value="offers"></asp:ListItem>
                        <asp:ListItem Text="Gallery" Value="gallery"></asp:ListItem>
                        <asp:ListItem Text="Enquiries" Value="enquiries"></asp:ListItem>
                        <asp:ListItem Text="What's On" Value="whatson"></asp:ListItem>
                        <asp:ListItem Text="Students" Value="students"></asp:ListItem>
                        <asp:ListItem Text="Menus" Value="menus"></asp:ListItem>
                        <asp:ListItem Text="Find Us" Value="findus"></asp:ListItem>
                        <asp:ListItem Text="About" Value="about"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvPage" ControlToValidate="ddlPage" ErrorMessage="(Required)" CssClass="red italic"
                            Display="Dynamic" InitialValue="0" ValidationGroup="add" runat="server"></asp:RequiredFieldValidator>
                </p>

                <p>
                    <label for="txtAltText">Alt. Text <span>(Required)</span></label>
                    <asp:TextBox ID="txtAlternateText" CssClass="textbox" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvAlternateText" ControlToValidate="txtAlternateText" ErrorMessage="(Required" CssClass="red italic"
                         Display="Dynamic" ValidationGroup="add" runat="server"></asp:RequiredFieldValidator>
                </p>

                <p>
                    <label for="ddlOrder">Order <span>(Required)</span></label>
                    <asp:DropDownList ID="ddlOrder" AppendDataBoundItems="true" ValidationGroup="add" CssClass="select" runat="server">
                        <asp:ListItem Text="-- select --" Value="xxx"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvOrder" ControlToValidate="ddlOrder" ErrorMessage="(Required)" CssClass="red italic"
                            Display="Dynamic" InitialValue="xxx" ValidationGroup="add" runat="server"></asp:RequiredFieldValidator>
                </p>

                <p>
                    <label for="rblTarget">Target</label>
                    <asp:RadioButtonList ID="rblTarget" runat="server">
                        <asp:ListItem Text="Current Window" Selected="True" Value="NULL"></asp:ListItem>
                        <asp:ListItem Text="New Window" Value="target=&quot;_blank&quot;"></asp:ListItem>
                    </asp:RadioButtonList>
                </p>

                <p>
                    <label for="txtNavigateURL">Navigate URL</label>
                    <asp:TextBox ID="txtNavigateURL" CssClass="textbox" runat="server"></asp:TextBox>
                </p>

                <p>
                    <label for="rblVisible">Visible</label>
                    <asp:RadioButtonList ID="rblVisible" ValidationGroup="add" runat="server">
                        <asp:ListItem Text="Yes" Value="true" Selected="True"></asp:ListItem>
                        <asp:ListItem Text="No" Value="false"></asp:ListItem>
                    </asp:RadioButtonList>
                </p>

                <p>
                    <label for="txtImageMap">Image Map</label>
                    <asp:TextBox ID="txtImageMap" TextMode="MultiLine" Rows="8" Width="200" runat="server"></asp:TextBox>
                </p>

                <div class="form-button-field">
                    <asp:Button ID="btnAddBannerInfo" Text="Add Banner Info" ValidationGroup="add" Height="33" 
                        OnClick="btnAddBannerInfo_Click" runat="server" />
                    <asp:Button ID="btnUpdateBannerInfo" Text="Update Banner Info" ValidationGroup="add" Height="33" 
                        OnClick="btnUpdateBannerInfo_Click" runat="server" />
                    &nbsp;
                    <asp:LinkButton ID="lbCancelAddBanner" Text="or Cancel" ValidationGroup="add" runat="server"></asp:LinkButton>
                </div>
            </asp:Panel>

            <asp:Panel ID="pnlConfirmDelete" Visible="false" runat="server">
                <p>
                    <label>Really delete? This cannot be undone. </label>
                </p>
                
                <p>
                    <asp:Button ID="btnDeleteYes" Text="Confirm Delete" OnClick="btnDeleteYes_Click" Height="33" ForeColor="#ee0000" Font-Bold="true" runat="server" />
                    &nbsp;
                    <asp:LinkButton ID="lbDeleteNo" Text=" or cancel" OnClick="lbDeleteNo_Click" runat="server"></asp:LinkButton>
                </p>    
            </asp:Panel>

            <asp:Panel ID="pnlMainBannerControl" runat="server">
                <asp:MultiView ID="mvPubBanners" ActiveViewIndex="0" runat="server">
                    <asp:View ID="viewSelectPub" runat="server">
                        <p>
                            <label for="ddlSelectPub">Select Pub</label>
                            <asp:DropDownList ID="ddlSelectPub" DataTextField="SiteName" DataValueField="PK_SiteID" CssClass="select"
                                 AppendDataBoundItems="true" Width="200" ValidationGroup="SelectPub" AutoPostBack="true"
                                 OnSelectedIndexChanged="ddlSelectPub_SelectedIndexChanged" runat="server">
                                <asp:ListItem Text="-- select --" Value="0"></asp:ListItem>
                            </asp:DropDownList>

                            <asp:Button ID="btnSelect" Text="Select" OnClick="btnSelect_Click" ValidationGroup="SelectPub" Enabled="false" runat="server" />
                            <br />
                            <asp:RequiredFieldValidator ID="rfvSelectPub" ControlToValidate="ddlSelectPub" Display="Dynamic" InitialValue="0"
                                 ErrorMessage="Select a pub!" ValidationGroup="SelectPub" runat="server"></asp:RequiredFieldValidator>
                        </p>
                    </asp:View>

                    <asp:View ID="viewPubBanners" runat="server">
                        <asp:Panel ID="pnlBannerGridView" runat="server">
                            <asp:Panel ID="pnlShowBanner" Visible="false" runat="server">
                                <asp:Image ID="imgSelectedBanner" Width="703" Height="260" runat="server" />
                                <p>
                                    <asp:Button ID="btnCloseSelectedBanner" Text="Close" OnClick="btnCloseSelectedBanner_Click" Height="33" runat="server"></asp:Button>
                                </p>
                            </asp:Panel>
                            
                            <asp:GridView ID="gvCurrentPubBanner" DataKeyNames="PK_MicrositeBannersID, ImageName" Width="850" 
                                EmptyDataText="Selected site has no banners" AutoGenerateColumns="false"
                                BorderWidth="0"
                                GridLines="None"
                                OnRowCommand="gvCurrentPubBanner_RowCommand"                          
                                SelectedRowStyle-CssClass="SelectedRowStyle"
                                SelectedRowStyle-BackColor="#ff000"
                                HeaderStyle-CssClass="upper"
                                HeaderStyle-BackColor="#666666"
                                HeaderStyle-ForeColor="#fffafa"
                                HeaderStyle-Height="33"
                                CellPadding="5"
                                runat="server">
                                <Columns>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                        <HeaderTemplate>
                                            Image Name (Click to view)
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lkbShowBanner" CommandArgument='<%#Eval("ImageName") %>'
                                                 CommandName="ShowBanner" Text='<%# Eval("ImageName") %>' runat="server"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="PageName" HeaderText="Page" HeaderStyle-HorizontalAlign="Left" 
                                        ItemStyle-HorizontalAlign="Left" />
                                    <asp:BoundField DataField="DisplayIndex" HeaderText="Order" ItemStyle-HorizontalAlign="Center" />
                                    <asp:BoundField DataField="IsVisible" HeaderText="Visible" ItemStyle-HorizontalAlign="Center" />
                                    <asp:BoundField DataField="ModifiedDate" ItemStyle-HorizontalAlign="Center"
                                        DataFormatString="{0:dd MMMM yyyy}"
                                        HeaderStyle-HorizontalAlign="Center" HeaderText="Modified Date" />
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:Button ID="btnEdit" CommandArgument='<%# Eval("PK_MicrositeBannersID") %>'
                                                 CommandName="EditBanner" Text="Edit" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:Button ID="btnDelete" CommandArgument='<%# Eval("PK_MicrositeBannersID") %>'
                                                 CommandName="DeleteBanner" Text="Delete" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>                                
                                </Columns>
                            </asp:GridView>
                        </asp:Panel>
 
                        <asp:Panel ID="pnlViewBannerDetails" Visible="true" runat="server">
                            <asp:DetailsView ID="dtvBannerDetails" AutoGenerateRows="false" runat="server">
                                <Fields>
                                    <asp:ImageField DataImageUrlField="ImageName" DataImageUrlFormatString="~\CustomImages\MicrositeBanners\{0}"
                                         AlternateText="{0}" NullDisplayText="No image or error occured retrieving file"
                                         HeaderText="Preview"></asp:ImageField>
                                    <asp:BoundField DataField="ImageName" HeaderText="Image Name" />
                                </Fields>
                            </asp:DetailsView>
                        </asp:Panel>
                    </asp:View>
                </asp:MultiView>
            </asp:Panel>
        </div>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

Code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using The1440.Library;
using System.Data;
using System.IO;
using System.Text;

namespace The1440.Admin
{
    public partial class PubBanners : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Form.Attributes.Add("enctype", "multipart/form-data");

            if (!Page.IsPostBack)
            {
                GetPubs();
                PopulateBannerOrder();
            }
        }

        protected void PopulateBannerOrder()
        {
            // Fairly aribtrary - but required, the users can override the database order
            for (int i = 0; i < 21; i++)
            {
                ddlOrder.Items.Add(new ListItem(i.ToString(), i.ToString()));
            }
        }

        // Get a list of pub banners - but only those with HasMicrosite = 1, this is controlled from the stored procedure
        protected void GetPubs()
        {
            dgMethods myObj = new dgMethods();
            DataTable dt = myObj.GetMicrositePubs();

            ddlSelectPub.DataSource = dt;
            ddlSelectPub.DataBind();
        }

        protected void ddlSelectPub_SelectedIndexChanged(Object sender, EventArgs e)
        {
            if (ddlSelectPub.SelectedValue != "0")
            {
                btnSelect.Enabled = true;
            }
            else
            {
                btnSelect.Enabled = false;
            }
        }

        protected void btnSelect_Click(Object sender, EventArgs e)
        {
            mvPubBanners.ActiveViewIndex = 1;
            lblPageSubTitle.Text = "Editing banners for " + ddlSelectPub.SelectedItem.ToString();

            GetCurrentBanners(Convert.ToInt32(ddlSelectPub.SelectedValue));

            ViewState["SiteID"] = ddlSelectPub.SelectedValue.ToString();
        }

        protected void GetCurrentBanners(int SiteID)
        {
            dgMethods myObj = new dgMethods();
            DataTable dt = myObj.GetPubBanners(SiteID);

            gvCurrentPubBanner.DataSource = dt;
            gvCurrentPubBanner.DataBind();

            ViewState["BannerData"] = dt;

            pnlCommandButtons.Visible = true;
        }

        public void gvCurrentPubBanner_SelectedIndexChanged(Object sender, EventArgs e)
        {
            if (gvCurrentPubBanner.SelectedIndex >= 0)
            {
                string break1 = gvCurrentPubBanner.SelectedDataKey.Value.ToString();
                ViewState["SelectedBanner"] = gvCurrentPubBanner.SelectedDataKey.Value.ToString();
                DisplayBannerDetails();
            }
            else
            {
                ViewState["SelectedBanner"] = null;
            }
        }

        protected void DisplayBannerDetails()
        {
            if (ViewState["BannerData"] != null)
            {
                DataTable dt = (DataTable)(ViewState["BannerData"]);
                string FilterExpression = "PK_MicrositeBannersID = " + Convert.ToInt32(ViewState["SelectedBanner"]);

                DataRow[] FoundRows;

                FoundRows = dt.Select(FilterExpression);
                DataSet FilteredTable = new DataSet();
                FilteredTable.Merge(FoundRows);

                dtvBannerDetails.DataSource = FilteredTable;
                dtvBannerDetails.DataBind();

                pnlViewBannerDetails.Visible = true;
                pnlBannerGridView.Visible = false;
            }
        }

        protected void btnSelectDiffPub_Click(Object sender, EventArgs e)
        {
            ResetBannerDeletionPage();
        }

        protected void ResetBannerDeletionPage()
        {
            pnlBannerGridView.Visible = true;
            pnlViewBannerDetails.Visible = true;
            pnlCommandButtons.Visible = false;
            mvPubBanners.ActiveViewIndex = 0;

            ViewState["SelectedBanner"] = null;
            ViewState["BannerData"] = null;

            lblPageSubTitle.Text = "Pubs Banners";

            ddlSelectPub.SelectedValue = "0";

            btnSelect.Enabled = false;
        }

        protected void gvCurrentPubBanner_RowCommand(object sender, GridViewCommandEventArgs e)
        {

            if (e.CommandName == "DeleteBanner")
            {
                int BannerToDelete = Convert.ToInt32(e.CommandArgument);
                ViewState["BannerForDeleteID"] = BannerToDelete;

                GridViewRow row = (GridViewRow)((Control)e.CommandSource).NamingContainer;
                
                //int BannerIDToDelete = Convert.ToInt32(gvCurrentPubBanner.DataKeys[row.RowIndex].Value);

                string BannerName = ((DataControlFieldCell)row.Cells[0]).Text;
                ViewState["BannerToDeleteName"] = BannerName;

                pnlConfirmDelete.Visible = true;
            }

            if (e.CommandName == "EditBanner")
            {
                int BannerToEdit = Convert.ToInt32(e.CommandArgument);
                ViewState["BannerToEditID"] = BannerToEdit;

                GridViewRow row = (GridViewRow)((Control)e.CommandSource).NamingContainer;
                string BannerName = ((DataControlFieldCell)row.Cells[0]).Text;
                ViewState["BannerToEditName"] = BannerName;
        
                GetBannerInformationForEdit(BannerToEdit);

                pnlUploadFurtherDetails.Visible = true;
                btnAddBannerInfo.Visible = false;
                btnUpdateBannerInfo.Visible = true;
            }

            if (e.CommandName == "ShowBanner")
            {
                CleanGridViewRows();

                GridViewRow row = (GridViewRow)((Control)e.CommandSource).NamingContainer;
                
                row.BackColor = System.Drawing.Color.Wheat;

                pnlCommandButtons.Visible = false;
                string BannerPath = "../CustomImages/MicrositeBanners" + "/" + e.CommandArgument.ToString();
                imgSelectedBanner.ImageUrl = BannerPath;
                pnlShowBanner.Visible = true;
            }
        }

        protected void CleanGridViewRows()
        {
            foreach (GridViewRow grow in gvCurrentPubBanner.Rows)
            {
                if (grow.BackColor == System.Drawing.Color.Wheat)
                {
                    grow.BackColor = System.Drawing.Color.White;
                }
            }
        }

        protected void GetBannerInformationForEdit(int BannerID)
        {
            pnlUploadFurtherDetails.Visible = true;
            PopulateBannerOrder();

            dgMethods dgm = new dgMethods();
            DataTable dt = dgm.GetBannerInformation(BannerID);

            txtNavigateURL.Text = dt.Rows[0][0].ToString();
            rblVisible.Items.FindByValue(dt.Rows[0][1].ToString().ToLower()).Selected = true;
            string test = dt.Rows[0][2].ToString().ToLower();
            ddlOrder.Items.FindByValue(dt.Rows[0][2].ToString()).Selected = true;
            txtAlternateText.Text = dt.Rows[0][3].ToString();
            ddlPage.Items.FindByValue(dt.Rows[0][4].ToString()).Selected = true;
            rblTarget.Items.FindByValue(dt.Rows[0][5].ToString()).Selected = true;
            txtImageMap.Text = dt.Rows[0][6].ToString();
        }

        protected void btnUpdateBannerInfo_Click(object sender, EventArgs e)
        {

        }

        protected void btnDeleteYes_Click(Object sender, EventArgs e)
        {
            dgMethods myObject = new dgMethods();

            int BannerID = Convert.ToInt32(ViewState["BannerForDeleteID"]);

            myObject.DeleteBanner(BannerID);

            RemoveBannerFile();

            ViewState["BannerForDeleteID"] = null;

            pnlConfirmDelete.Visible = false;

            lblPageSubTitle.Text = "Banner Deleted";

            ViewState["BannerToDeleteName"] = null;

            GetCurrentBanners(Convert.ToInt32(ddlSelectPub.SelectedValue));
        }

        protected void lbDeleteNo_Click(Object sender, EventArgs e)
        {
            ViewState["BannerForDeleteID"] = null;
            pnlConfirmDelete.Visible = false;
        }

        protected void RemoveBannerFile()
        {
            string BannerToDelete = ViewState["BannerToDeleteName"].ToString();
            string path = Server.MapPath("/CustomImages/MicrositeBanners/" + BannerToDelete);

            File.Delete(path);
        }

        protected void btnUploadFile_Click(object sender, EventArgs e)
        {
            string SavePath = HttpContext.Current.Server.MapPath("/CustomImages/MicrositeBanners");

            if (fuBanner.HasFile)
            {
                int FileSize = fuBanner.PostedFile.ContentLength;

                if (FileSize < 51200)
                {
                    string FileName = Server.HtmlEncode(fuBanner.FileName);
                    string Extension = Path.GetExtension(FileName);

                    if ((Extension == ".gif") || (Extension == ".jpg") || (Extension == ".png"))
                    {
                        bool fileExists = checkFileName(fuBanner.FileName);

                        if (!fileExists)
                        {
                            ViewState["BannerName"] = fuBanner.FileName;

                            SavePath += Server.HtmlEncode("\\" + fuBanner.FileName);

                            fuBanner.SaveAs(SavePath);

                            lblPageSubTitle.Text = "Details for banner " + ViewState["BannerName"].ToString() + " for " + ddlSelectPub.SelectedItem.ToString();
                            pnlAddBanner.Visible = false;
                            pnlUploadFurtherDetails.Visible = true;
                        }
                        else
                        {
                            lblPageSubTitle.Text = "Error!";
                            lblMessages.Text = "Banner name already exists in the system. If you wish to upload this banner please " +
                                "delete the existing banner.";
                        }
                    }
                    else
                    {
                        lblPageSubTitle.Text = "Invalid file type, must be an image!";
                    }
                }
                else
                {
                    lblPageSubTitle.Text = "Your banner image is too large!";
                }
            }
        }

        protected void btnUploadNewBanner_Click(object sender, EventArgs e)
        {
            pnlCommandButtons.Visible = false;
            pnlMainBannerControl.Visible = false;
            pnlAddBanner.Visible = true;
            pnlShowBanner.Visible = false;
        }

        protected void btnCancelUpload_Click(object sender, EventArgs e)
        {
            pnlCommandButtons.Visible = true;
            pnlMainBannerControl.Visible = true;
            pnlAddBanner.Visible = false;
        }

        protected void btnAddBannerInfo_Click(object sender, EventArgs e)
        {
            dgMethods dgm = new dgMethods();

            string siteBrandID = GetSiteBrandID(Convert.ToInt32(ViewState["SiteID"]));

            bool result = dgm.AddBannerInfo(ViewState["BannerName"].ToString(), txtNavigateURL.Text, Convert.ToBoolean(rblVisible.SelectedValue),
                Convert.ToInt32(ddlOrder.SelectedValue), Convert.ToInt32(ViewState["SiteID"]), 
                siteBrandID,
                txtAlternateText.Text, ddlPage.SelectedValue, rblTarget.SelectedValue, txtImageMap.Text);

            if (result)
            {
                lblPageSubTitle.Text = "Success!";
                lblMessages.Text = "Banner for " + ddlSelectPub.SelectedItem.ToString() + " uploaded.";
                pnlUploadFurtherDetails.Visible = false;
                GetCurrentBanners(Convert.ToInt32(ddlSelectPub.SelectedValue));
                pnlMainBannerControl.Visible = true;
            }
            else
            {
                lblMessages.Text = "An error ocurred attempting to add your banner to the system. The banner has uploaded, " +
                    "but your information has not been saved";
            }
        }

        protected string GetSiteBrandID(int SiteID)
        {
            dgMethods dgm = new dgMethods();
            return dgm.GetPubBrandID(SiteID);
        }

        protected bool checkFileName(string Filename)
        {
            dgMethods dgm = new dgMethods();
            return dgm.CheckFileName(Filename);
        }

        protected void btnCloseSelectedBanner_Click(object sender, EventArgs e)
        {
            CleanGridViewRows();
            pnlShowBanner.Visible = false;
            pnlCommandButtons.Visible = true;
        }
    }
}
ASKER CERTIFIED SOLUTION
Knakworst

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros