<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="GrdTopBanners" />
</Triggers>
<ContentTemplate>
<asp:Panel ID="pnlCollapseManageTopBanners" runat="server" Width="100%" CssClass="collapsePanelHeader">
<asp:Image ID="Image12" runat="server" ImageUrl="~/Images/collapse.gif" />
<asp:Label ID="Label15" runat="server" Text="Show..." CssClass="collapse"></asp:Label><br />
</asp:Panel>
<asp:Panel ID="pnlManageTopBanners" runat="server" Width="100%" CssClass="collapsePanel">
<asp:GridView ID="GrdTopBanners" runat="server" AutoGenerateColumns="False" DataKeyNames="ImageId"
OnRowCancelingEdit="GrdTopBanners_RowCancelingEdit" OnRowCommand="GrdTopBanners_RowCommand"
OnRowDataBound="GrdTopBanners_RowDataBound" OnRowDeleting="GrdTopBanners_RowDeleting"
OnRowEditing="GrdTopBanners_RowEditing" OnRowUpdating="GrdTopBanners_RowUpdating"
ShowFooter="True" CssClass="grdStyles"
OnPageIndexChanging="GrdTopBanners_PageIndexChanging" AllowPaging="True" PageSize="20">
<Columns>
<asp:TemplateField HeaderText="Image">
<EditItemTemplate>
<asp:FileUpload CssClass="systxtarea_a" ID="FileUploader" runat="server" />
</EditItemTemplate>
<FooterTemplate>
<asp:FileUpload CssClass="systxtarea_a" ID="FileUploaderNew" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidatorImageUploadAdd" runat="server"
ErrorMessage="Please add an image." Text="*" ControlToValidate="FileUploaderNew"
ValidationGroup="AddTopBanners">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidatorImageFileType" runat="server"
ErrorMessage="Only .gif,.jpeg,.jpg,.bmp formats are allowed." Text="*" ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.gif|.jpeg|.jpg|.bmp)$"
ControlToValidate="FileUploaderNew" ValidationGroup="AddTopBanners">
</asp:RegularExpressionValidator>
</FooterTemplate>
<ItemTemplate>
<asp:Image ID="ImgTopBanner" runat="server" Height="50px" Width="50px" ImageUrl='<%# "~/TopBannerLoader.ashx?ImageId=" + Eval("ImageId") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit">
<EditItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" ValidationGroup="EditTopBanners"
CommandName="Update" Text="Update"></asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel"></asp:LinkButton>
<asp:ValidationSummary ID="ValidationSummaryTopBannersEdit" runat="server" CssClass="TextLabels"
ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditTopBanners" />
</EditItemTemplate>
<FooterTemplate>
<asp:LinkButton ID="LinkButton2" runat="server" CommandName="AddNew" ValidationGroup="AddTopBanners"
Text="Add New"></asp:LinkButton>
<asp:ValidationSummary ID="ValidationSummaryTopBannersAdd" runat="server" CssClass="TextLabels"
ShowMessageBox="True" ShowSummary="False" ValidationGroup="AddTopBanners" />
</FooterTemplate>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
Text="Edit"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete">
<ItemTemplate>
<asp:LinkButton ID="lnkBtnDeleteHotel" runat="server" CausesValidation="False" CommandName="Delete"
Text="Delete" OnClientClick="return confirm('Are you certain you want to delete this image?');"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Label ID="Label16" runat="server" Text="" Visible="false"></asp:Label>
</asp:Panel>
<cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender12" runat="server" TargetControlID="pnlManageTopBanners"
ExpandControlID="pnlCollapseManageTopBanners" CollapseControlID="pnlCollapseManageTopBanners"
TextLabelID="Label15" CollapsedText="Manage Top Banners" ExpandedText="Manage Top Banners"
ImageControlID="Image12" ExpandedImage="~/Images/collapse.gif" CollapsedImage="~/Images/expand.gif"
Collapsed="True" SuppressPostBack="true">
</cc1:CollapsiblePanelExtender>
</ContentTemplate>
</asp:UpdatePanel>
Add a PostBackTrigger and give the name of the gridview as follows "ControlID="GrdTopBanners""