Default button not triggered in Panel - asp.net

Whys is not lblMasterPhoneNumbers onclick method trigger when i press enter in the textbox?
<asp:Panel ID="pnlSearch" DefaultButton="lbMasterPhoneNumber" runat="server">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<asp:TextBox ID="txtSearchMaster" runat="server" CssClass="TextBoxSearchActive" EnableTheming="false" />
</td>
<td>
<%--<asp:Button ID="btnSearchMaster" CssClass="SearchButton" runat="server" OnClick="btnSearchMaster_Click" CausesValidation="false" EnableTheming="False" />--%>
</td>
</tr>
<tr>
<td colspan="2">
<div style="margin-right:3px; color:white">
<asp:LinkButton ID="lbMasterPhoneNumber" runat="server" Text="Phone number" ForeColor="White" onclick="lbMasterPhoneNumber_Click" OnClientClick="javascript:ActivateLoadingIndicator()" /> |
<asp:LinkButton ID="lbMasterCDR" runat="server" Text="CDR" ForeColor="White" onclick="lbMasterCDR_Click" /> |
<asp:LinkButton ID="lbMasterSMS" runat="server" Text="SMS" ForeColor="White" onclick="lbMasterSMS_Click" />
</div>
</td>
</tr>
</table>
</asp:Panel>

msdn states that defaultbutton property does not support linkbutton http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.panel.defaultbutton.aspx

Related

Control inside repeater causing full postback even after keeping in update panel

In my page, I have one search button and a repeater. I have wrapped everything inside UpdatePanel. My search button do not causes full postback, i.e ideal but RadioButtonList inside Repeater control does. I have no idea what to do.
<asp:UpdatePanel ID="up" runat="server">
<ContentTemplate>
<table align="center" border="1" cellspacing="0" class="tabmn6">
<tr id="trheader" runat="server">
<th id="trEdit" runat="server">Edit</th>
<th>User Name </th>
<th>Role</th>
<th>From Date</th>
<th>To Date</th>
<th>Comment</th>
<th>Status</th>
</tr>
<asp:Repeater ID="rpUserDetails" runat="server" OnItemDataBound="rpUserDetails_ItemDataBound">
<ItemTemplate>
<tr>
<td id="tdRPEdit" runat="server" align="center">
<input type="button" class="editbtn" name="btnEdit" id="btnEdit" runat="server" onclick='<%# string.Format("javascript:return AddBoardCast(\"{0},{1}\")", Eval("BC_ID"),"Edit") %>'>
</td>
<td id="trRPTL" runat="server" align="center">
<asp:Label ID="lblUName" runat="server" ForeColor="Red" Text='<%#Eval("UserName")%>' />
</td>
<td align="center">
<asp:Label ID="lblRoleName" runat="server" ForeColor="Black" Text='<%#Eval("RoleName")%>' />
</td>
<td align="center">
<asp:Label ID="lblToDate" runat="server" ForeColor="Black"><%#DataBinder.Eval(Container.DataItem, "BC_FromDate", "{0:dd/MM/yyyy}")%></asp:Label>
</td>
<td align="center"><asp:Label ID="lblFromDate" runat="server" ForeColor="Black"><%#DataBinder.Eval(Container.DataItem, "BC_TODate", "{0:dd/MM/yyyy}")%></asp:Label></td>
<td align="center" width="20%">
<div style="color: black"><%#Eval("BC_Comment")%></div>
</td>
<td align="center">
<asp:HiddenField ID="hdnBC_ID" runat="server" Value='<%#Eval("BC_ID") %>' />
<asp:HiddenField ID="hdnUserID" runat="server" Value='<%#Eval("UserID") %>' />
<asp:RadioButtonList ID="rdStatus" runat="server" Height="48px" RepeatDirection="Horizontal" AutoPostBack="true" OnSelectedIndexChanged="rdStatus_SelectedIndexChanged" CssClass="rad">
<asp:ListItem Text="Active" Value="1"></asp:ListItem>
<asp:ListItem Text="Deactive" Value="0"></asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</ContentTemplate>
</asp:UpdatePanel>

Update an UpdatePanel from a ModalPopUpExtender

I can't get to update an updatepanel when it is being called upon by a modalpopupextender. It's a small search popup window, it has two parts the patient's name part and the history part. The popupextender is triggered by an image button and in the OnClick codebehind:
protected void imgSearchPrincipal_Click(object sender, ImageClickEventArgs e)
{
tblMedHistory.Visible = false;
upMedHistory.Update();
pnlMedSrchPrincipal_Ext.Show();
}
Here is the script for the pop up window:
<div runat="server" id="divMedSearch" class="cls_gen_style">
<asp:Panel runat="server" ID="pnlMedSearch" >
<table runat="server" class="tables_gen tblPop"><tr><td>
<table style="border-spacing:0px">
<tr><td style="height:10px"></td></tr>
<tr><td colspan="6" class="tp_dotline"></td></tr>
<tr>
<td colspan="4" class="rw_header">SEARCH</td>
<td colspan="2" style="background-color:navy; text-align:center"><asp:LinkButton runat="server" ID="lbClose" Style="color:white" Text="CLOSE" OnClick="lbClose_Click"></asp:LinkButton> </td>
</tr>
<tr><td colspan="6" class="bt_dotline"></td></tr>
<tr><td style="height:7px"></td></tr>
<tr>
<td style="width:3px"></td>
<td>PATIENT NAME</td>
<td><input type="text" runat="server" id="txt_srch_patient" /></td>
<td></td>
<%--<td><input type="button" runat="server" id="btnSearch" class="btn btn-info btns_text" value="SEARCH" /></td>--%>
<td><asp:Button runat="server" ID="btnSearch" CssClass="btn btn-info btns_text" Text="SEARCH" OnClick="btnSearch_Click"/></td>
<td style="width:5px"></td>
</tr>
<tr>
<td colspan="2"></td>
<td>
<table style="font-size:8px">
<tr>
<td>SEARCH IN:</td>
<td style="width:3px"></td>
<td><asp:RadioButton runat="server" ID="rdoLastname" /> </td>
<td>LAST NAME</td>
<td><asp:RadioButton runat="server" ID="rdoFullname" /></td>
<td>FULL NAME</td>
</tr>
</table>
</td></tr>
<tr><td colspan="6" class="tp_dotline"></td></tr>
<tr><td style="height:5px"></td></tr>
<tr>
<td></td>
<td colspan="4">
<asp:GridView runat="server" ID="gvClientNames"
RowStyle-Wrap ="false"
ShowHeader="true"
HeaderStyle-Height="30px"
Font-Names="Arial,Sans-Serif"
CellPadding="4"
ForeColor="#333333"
GridLines="None"
RowHeaderColumn="1"
Width="100%"
BackColor="White"
Font-Size="10px"
AlternatingRowStyle-BackColor="AliceBlue"
AutoGenerateColumns="False"
ShowHeaderWhenEmpty="True"
HeaderStyle-BackColor="#507CD1"
HeaderStyle-ForeColor="White">
<Columns>
<%--<asp:BoundField DataField="claim_no" HeaderText="CLAIM NO" />--%>
<asp:BoundField DataField="policy_no" HeaderText="POLICY NO" />
<asp:BoundField DataField="name" HeaderText="NAME" HeaderStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</td>
<td></td>
</tr>
<tr><td style="height:5px"></td></tr>
<tr><td colspan="6" class="tp_dotline"></td></tr>
<tr><td colspan="5" style="text-align:right"><input type="button" runat="server" id="btnSelName" class="btn btn-info btns_text" value="SELECT NAME" /> </td></tr>
</table>
<div runat="server" id="divMedHistory">
<asp:UpdatePanel runat="server" ID="upMedHistory"><ContentTemplate>
<table runat="server" id="tblMedHistory" style="width:100%">
<tr><td colspan="6" class="bt_dotline"></td></tr>
<tr>
<td></td>
<td colspan="2">MEDICAL HISTORY</td>
</tr>
<tr><td style="height:3px"></td></tr>
<tr>
<td></td>
<td colspan="4">
<asp:GridView runat="server" ID="gvMedHistory"
RowStyle-Wrap ="false"
ShowHeader="true"
HeaderStyle-Height="30px"
Font-Names="Arial,Sans-Serif"
CellPadding="4"
ForeColor="#333333"
GridLines="None"
RowHeaderColumn="1"
Width="100%"
BackColor="White"
Font-Size="10px"
AlternatingRowStyle-BackColor="AliceBlue"
AutoGenerateColumns="False"
ShowHeaderWhenEmpty="True"
HeaderStyle-BackColor="#507CD1"
HeaderStyle-ForeColor="White">
<Columns>
<asp:BoundField DataField="claim_no" HeaderText="CLAIM NO" />
<asp:BoundField DataField="policy_no" HeaderText="POLICY NO" />
<asp:BoundField DataField="diagnosis" HeaderText="DIAGNOSIS" />
<asp:BoundField DataField="date" HeaderText="DATE" />
</Columns>
</asp:GridView>
</td>
</tr>
<tr><td style="height:5px"></td></tr>
<tr><td colspan="5" class="tp_dotline"></td></tr>
<tr><td colspan="5" style="text-align:right"><input type="button" runat="server" id="btnOpenClaim" class="btn btn-info btns_text" value="OPEN CLAIM" /> </td></tr>
<tr><td style="height:10px"></td></tr>
</table>
</ContentTemplate>
<%--<Triggers>
<asp:AsyncPostBackTrigger ControlID="imgSearchPrincipal" />
</Triggers>--%>
</asp:UpdatePanel>
</div>
</td></tr></table>
</asp:Panel>
<%--<asp:HiddenField ID="hfClientID" runat="server" />
<asp:HiddenField ID="hfOtherFeeID" runat="server" />
<asp:HiddenField ID="hfOtherDocID" runat="server" />
<%--<ajaxToolkit:ModalPopupExtender ID="pnlPolicyLogin_Ex" runat="server" TargetControlID="pnlPolicyLogin_ModalEx_Ctrl" PopupControlID="pnlPolicyLogin" BackgroundCssClass="modalLogin" Enabled="True" />--%>
<ajaxToolkit:ModalPopupExtender runat="server" ID="pnlMedSrchPrincipal_Ext" TargetControlID="imgSearchPrincipal" PopupControlID="pnlMedSearch" Enabled="true" ></ajaxToolkit:ModalPopupExtender>
<ajaxToolkit:ModalPopupExtender runat="server" ID="pnlMedSrchPatient_Ext" TargetControlID="imgSearchPatient" PopupControlID="pnlMedSearch" Enabled="true" ></ajaxToolkit:ModalPopupExtender>
</div>
This window pop-ups just fine. But the problem is I need to hide the tblMedHistory when the user clicks the imagebutton (imgSearchPrincipal). But if the user clicks a different imagebutton, I need to display the tblMedHistory back as it pops up. I can't get to hide the table when the div/panel is being called by the popextender. Any workaround?
Thanks,
I think I've finally solved this issue. Instead of pointing the TargetControlID of the ModalPopUpExtender to the image button that also triggers the visibility of the table, I reference the TargetControlID to a hidden field, so now the imagebutton controls the visibility of the table as well as the popup through codebehind without the use of the updatepanel

Server side events not firing the first time when asp validator used into the page

I am created a page with update panel and used Asp.net validation controls to be
validated the page is making an issue is "i am straightly going to submit the page
and page gets validated properly then, i am going to click/select any controls on
the page is not get post back"
The below code i am used
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<div id="divMyDataManualEntry" runat="server">
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<td style="width: 5%;" valign="top">
<asp:Label ID="lblGeo" Font-Bold="true" runat="server" Text="Geography"></asp:Label><span
class="redtext">*</span>
</td>
<td valign="top" style="width: 15%">
<asp:DropDownList ID="ddlgeo" TabIndex="1" runat="server" CssClass="textbox" Width="100%"
OnSelectedIndexChanged="ddlgeo_SelectedIndexChanged" AutoPostBack="true">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlgeo"
ValidationGroup="Submit" InitialValue="-1" ErrorMessage="Select Geography"></asp:RequiredFieldValidator>
</td>
</tr> </table>
<table width="100%" id="BtnContainer" runat="server">
<tr>
<td align="center">
<asp:Button ID="btnSubmit" runat="server" OnClientClick="javascript:return IsValidated();"
ValidationGroup="Submit" CssClass="Keybutton" TabIndex="14" Text="Submit" OnClick="btnSubmit_Click" />
<asp:Button ID="btnreset" runat="server" Text="Reset" CssClass="Keybutton" TabIndex="15"
OnClick="btnReset_click" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>

Modalpopup wont close when dropdown is selected

I've been having this odd issue with modal popups. For some reason when I choose a dropdown item my update button wont fire a click event. but then I leave the dropdown at their default values the update button works just fine.
here's my aspx page code
<asp:Button ID="Button1" CssClass="hide" runat="server" Text="Button" />
<ajaxToolkit:ModalPopupExtender runat="server" ID="cfPopUp" PopupControlID="Panel4"
TargetControlID="Button1" OkControlID="cfUpdateBtn" CancelControlID="cfCancelBtn" />
<asp:Panel ID="Panel4" runat="server" CssClass="modalPopup">
<asp:UpdatePanel ID="UpdatePanel2" runat="Server">
<ContentTemplate>
<asp:Panel ID="Panel13" CssClass="" runat="server">
<asp:Panel ID="Panel14" CssClass="" runat="server">
<div style="padding: 10px; border: 3px solid black; background-color: White; color: Black;">
<asp:Label ID="Label25" Width="200px" runat="server" Text="Health and Safety Net" /><div
class="seperator">
</div>
<table class="style143">
<tr>
<td class="style185">
<asp:Label ID="cfCategorylbl" runat="server" Text="Category:"></asp:Label>:
</td>
<td>
<asp:DropDownList ID="cbFactors_Categories" runat="server" Width="350px" Font-Names="Tahoma"
Font-Size="Small" ForeColor="DimGray" Height="24px" CssClass="style75">
</asp:DropDownList>
<ajaxToolkit:CascadingDropDown ID="CascadingDropDown3" runat="server" TargetControlID="cbFactors_Categories"
Category="categories" ServiceMethod="getCategory" ServicePath="~/2012/IrSubmitWebService.asmx"
PromptText="Select Category" />
</td>
<td align="center" rowspan="3" valign="top">
<asp:Label ID="lblFactor_ID" runat="server" Font-Names="Tahoma" Font-Size="Small"
ForeColor="DimGray" Style="font-style: italic" TabIndex="56"></asp:Label>
<cc1:DynamicPopulateExtender ID="lblFactor_ID_DynamicPopulateExtender" runat="server"
Enabled="True" TargetControlID="lblFactor_ID" BehaviorID="dp1" ServiceMethod="getFactorID"
ServicePath="~/2012/IrSubmitWebService.asmx">
</cc1:DynamicPopulateExtender>
<hr class="style157" />
<asp:Label ID="cfID" runat="server" Font-Names="Tahoma" Font-Size="Small" ForeColor="DimGray"
Style="font-style: italic" Width="400px" TabIndex="57"></asp:Label>
</td>
</tr>
<tr>
<td class="style185">
<asp:Label ID="cfTypeslbl" runat="server" Text="Type:"></asp:Label>
</td>
<td>
<asp:DropDownList ID="cbFactors_Types" runat="server" ForeColor="DimGray" Height="24px"
TabIndex="54" Width="350px" Font-Names="Tahoma" Font-Size="Small" CssClass="style75">
</asp:DropDownList>
<cc1:CascadingDropDown ID="cbFactors_Types_CascadingDropDown" runat="server"
TargetControlID="cbFactors_Types" ParentControlID="cbFactors_Categories" Category="type"
ServiceMethod="getTypeofAction" ServicePath="~/2012/IrSubmitWebService.asmx"
PromptText="Select Type">
</cc1:CascadingDropDown>
</td>
</tr>
<tr>
<td class="style185">
<asp:Label ID="cfFactorslbl" runat="server" Text="Factor:"></asp:Label>
</td>
<td>
<asp:DropDownList ID="cbFactors_Factors" runat="server" ForeColor="DimGray" Height="24px"
TabIndex="55" Width="350px" Font-Names="tahoma" Font-Size="Small" CssClass="style75">
</asp:DropDownList>
<cc1:CascadingDropDown ID="cbFactors_Factors_CascadingDropDown" runat="server"
TargetControlID="cbFactors_Factors" ParentControlID="cbFactors_Types" Category="category"
ServiceMethod="getFactor" ServicePath="~/2012/IrSubmitWebService.asmx" PromptText="Select Factor">
</cc1:CascadingDropDown>
</td>
</tr>
<tr>
<td class="style185">
<asp:Label Text="Justification:" ID="cfJustificationlbl" runat="server"></asp:Label>
</td>
<td colspan="2">
<asp:TextBox ID="txtJustification" runat="server" ForeColor="DimGray" Height="29px"
Style="font-family: Tahoma; font-size: small" TabIndex="56" TextMode="MultiLine"
ToolTip="Provide a justification for this factor." Width="775px" Font-Names="Tahoma"
Font-Size="Small"></asp:TextBox>
</td>
</tr>
</table>
<br />
<div style="text-align: center">
<asp:Button CausesValidation="false" ID="cfUpdateBtn" runat="server"
Text="Update" CssClass="button" /><span style="margin-left: 10px"><asp:Button CausesValidation="false"
ID="cfCancelBtn" runat="server" Text="Cancel" CssClass="button" /></span></div>
</div>
</asp:Panel>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
and my code behind for my update (it just closes the popup)
Protected Sub cfUpdateBtn_Click(sender As Object, e As EventArgs) Handles cfUpdateBtn.Click
cfPopUp.Hide()
End Sub
For the life of me I can't figure out why the update button wont work when the dropdowns are not the default value.
Thanks for your help guys
The possible reason may be you are binding your dropdownlist with a webservice. Whenever you click to an item on dropdownlist webservice may be called. If webservice is called then may be your page again loaded ? I don't know the exact reason why it is not working. You have to check the service behavior what happened when the service is called.
I basically rebuilt my modal popup and update panel like so
<asp:Panel ID="pnlEditPopup" runat="server" CssClass="modalPopup">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Panel ID="pnlEditPopupContent" runat="server">
<div style="padding: 10px; border: 3px solid black; background-color: White; color: Black;">
<table cellpadding="0" cellspacing="4" border="0">
<tr>
<td class="name">Category:</td>
<td class="value">
<asp:DropDownList id="ddCat" runat="server">
<asp:listitem value="">No Selection</asp:listitem>
<asp:listitem value="Action">Action</asp:listitem>
<asp:listitem value="Worksite">Worksite</asp:listitem>
<asp:listitem value="Human Factors">Human Factors</asp:listitem>
<asp:listitem value="System Factors">System Factors</asp:listitem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="name">Type:</td>
<td class="value">
<asp:DropDownList id="ddType" runat="server" />
<ajaxToolkit:CascadingDropDown ID="ccType" runat="server"
TargetControlID="ddType"
ParentControlID="ddCat"
PromptText="No Selection"
LoadingText="Please Wait..."
ServicePath="~/2012/IrSubmitWebService.asmx"
ServiceMethod="getTypeofAction"
Category="Other"
/>
</td>
</tr>
<tr>
<td class="name">Factor:</td>
<td class="value">
<asp:DropDownList id="ddfactor" runat="server" />
<ajaxToolkit:CascadingDropDown ID="ccFactor" runat="server"
TargetControlID="ddfactor"
ParentControlID="ddType"
PromptText="No Selection"
LoadingText="Please Wait..."
ServicePath="~/2012/IrSubmitWebService.asmx"
ServiceMethod="getFactor"
Category="Other"
/>
</td>
</tr>
<tr>
<td>
Justification:
<asp:Label ID="factorID" runat="server" Visible="false"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtJustification" runat="server" ForeColor="DimGray" Height="100px"
Style="font-family: Tahoma; font-size: small" TabIndex="56" TextMode="MultiLine"
ToolTip="Provide a justification for this factor." Width="300px" Font-Names="Tahoma"
Font-Size="Small"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Factor ID<br />
and Description:
</td>
<td>
<asp:Label ID="factor_id_Desc" runat="server" Width="300px" Font-Names="Tahoma" Font-Size="Small"
ForeColor="DimGray" TabIndex="56"></asp:Label>
<cc1:DynamicPopulateExtender ID="DynamicPopulateExtender1" runat="server"
Enabled="True" TargetControlID="factor_id_Desc" BehaviorID="dp1" ServiceMethod="getFactorID"
ServicePath="~/2012/IrSubmitWebService.asmx">
</cc1:DynamicPopulateExtender>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="btnOkEditPopup" runat="server" Text="Ok" CssClass="button"/>
<span style="margin-left:10px"><asp:button id="btnCancelEditPopup" runat="server" text="Cancel" CssClass="button"/></span>
</td>
</tr>
</table>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<ajaxToolkit:ModalPopupExtender ID="mpeEdit" runat="server"
TargetControlID="btnOpenEditPopup"
PopupControlID="pnlEditPopup"
/>
Fixed my issue. I still dont know why it wasn't working when I asked the question but I was able to solve it. Thanks to all who looked into it for me.

Update panel Postback

I Have A web Page Having Two TextBox and Two Image Button on Image Button Click
open the ModalPopupExtender having Grid inside the ModelPopExtender. mean Grid Pop open on image button CLick. Problem is That when i click the button It show ModelPopExtender and Close.
auto and Page Post Back and Again Pop open. I want that pop is open stage not to post back.
aspx Code is like:
"
<asp:ImageButton ID="imgbtnExpenseGL" runat="server" ImageUrl="../../Images/icon_popup.gif" ImageAlign="Top" OnClientClick="ShowPopupExpGLSearch();" />
<AjaxToolKit:AutoCompleteExtender
ID="AutoCompleteExtender1"
runat="server"
CompletionInterval="100"
CompletionSetCount="12"
EnableCaching="false"
MinimumPrefixLength="1"
ServiceMethod="GetGLAccountList"
TargetControlID="txtExpenseGL"
>
</AjaxToolKit:AutoCompleteExtender>
<AjaxToolKit:ModalPopupExtender
ID="ModalPopupExtender1"
runat="server"
BackgroundCssClass="modalBackground"
CancelControlID="btnCancelCountry"
DropShadow="true"
PopupControlID="divExpenseGLSearch"
TargetControlID="imgbtnExpenseGL">
</AjaxToolKit:ModalPopupExtender>
</ContentTemplate>
</asp:UpdatePanel>"
Thier two update panel like that having same code.
and This Grid Bind div Code:
<div id="divAccountGLSearch" class="popup" style="display: none; width: 350px;">
<table width="98%" align="center" border="0" cellpadding="0" cellspacing="0" style="height: 320px;">
<%-- For Heading and Image and CloseDiv --%>
<%-- Row 1 For Header Text --%>
<tr>
<th>
<h1>
List of Pre-Paid Account GL
</h1>
</th>
<td align="right" valign="top" style="padding-top: 6px;">
<img onclick="CloseDiv();" src="../../Images/close.gif" border="0" />
</tr>
<%-- Row 2 For Find TextBox and Find Button --%>
<tr>
<td class="form-label" style="padding-left: 5px;width:70%;">
Search
<asp:TextBox ID="txtFindPrePaidExpenses" runat="server" onBlur="javascript:setpopupfocus();" ></asp:TextBox>
</td>
<td align="left" style="width:30%;">
<table>
<tr>
<td>
<asp:LinkButton ID="btnFindCountry" CssClass="button" runat="server"
OnClientClick="ShowPopupAccGLSearch();" onclick="btnFindCountry_Click">
<span>Find</span></asp:LinkButton>
</td>
</tr>
</table>
</td>
</tr>
<%-- Row 3 For Repater Control --%>
<tr>
<td colspan="2" align="center">
<div style="overflow: auto; height: 280px; width: 100%;">
<asp:GridView ID="gvSearchAccountGL" runat="server" AutoGenerateColumns="False"
Width="98%" CssClass="table-grid" border="0" CellPadding="0"
CellSpacing="0" onrowdatabound="gvSearchAccountGL_RowDataBound"
>
<Columns>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:HiddenField ID="hfIndex" runat="server" Value='<%# Container.DataItemIndex + 1 %>'/>
</ItemTemplate>
<HeaderStyle HorizontalAlign="left" />
<ItemStyle HorizontalAlign="left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Account GL">
<ItemTemplate>
<asp:Label ID="lblAccountGLCode" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ACM_ACCOUNT_CODE")%>' ></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="left" />
<ItemStyle HorizontalAlign="left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Account Description">
<ItemTemplate>
<asp:Label ID="lblAccountGLDescription" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ACM_ACCOUNT_DESC")%>' ></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="left" />
<ItemStyle HorizontalAlign="left" />
</asp:TemplateField>
</Columns>
<RowStyle CssClass="gridRow" />
<HeaderStyle CssClass="gridHeader" />
<SelectedRowStyle BackColor ="Gray" />
</asp:GridView>
</div>
</td>
</tr>
<%-- Row 4 For Space Image --%>
<tr>
<td colspan="2">
<img src="../../Images/spacer.gif" border="0" class="seprator" />
</td>
</tr>
<%-- Row 5 For OK and Cancel Button --%>
<tr>
<td colspan="2">
<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
<asp:LinkButton ID="btnOKPrePaidExpense" CssClass="button" runat="server"
onclick="btnOKPrePaidExpense_Click">
<span>OK</span></asp:LinkButton>
</td>
<td>
</td>
<td>
<asp:LinkButton ID="btnCancelPrePaidExpense" CssClass="button" runat="server">
<span>Cancel</span></asp:LinkButton>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
My div Bind Code is Out off Update Panel Code.
so how to stop postback and Stable Pop Control
Thank U
To prevent the ImageButton control from automatically posting back when it's clicked, your ShowPopupExpGLSearch() function should return false.

Resources