Update an UpdatePanel from a ModalPopUpExtender - asp.net

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

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>

Not able to see radio button list in my screen

I am unable to see the radio button list yes or NO in my screen I am getting the values from XML file.
Following code in aspx page:
<asp:Panel ID="pnlAction" runat="server" Width="100%" Visible="false">
<table cellpadding="0" cellspacing="0" border="0" width="99%">
<tr style="height: 20px;">
<td style="width: 25px;">
<hr />
</td>
<td class="secHeading frmlblBold"" style="width: 80px;" align="center">
Action
</td>
<td>
<hr />
</td>
</tr>
</table>
<table style="font-weight:normal" width="100%" border="0" cellpadding="2" cellspacing="2">
<tr>
<td style="width:250px;"></td>
<td style="width:350px;"></td>
<td style="width:250px;"></td>
<td style="width:350px;"></td>
</tr>
<tr>
<td class="frmlblBold" style="text-align:right;vertical-align:top">Action </td>
<td><asp:DropDownList ID="ddlAction" runat="server" CssClass="DropDown" DataSourceID="dsAction" DataValueField="CODE" DataTextField="CDDesc" AutoPostBack = "False" Width="342px"></asp:DropDownList></td>
</tr>
<tr>
<td class="frmlblBold" style="text-align:right;vertical-align:top">Service Agreement Clause </td>
<td style="vertical-align:top" style="width: 350px;">
<%-- <fieldset id="fldSLA" runat="server" style="width: 280px;">--%>
<asp:RadioButtonList ID="radSLA" runat="server" RepeatDirection="Horizontal" DataValueField="SLAID" DataTextField="SLADESC" DataSourceID="dsSLA" visible = "true">
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="rfvSLA" runat="server" ControlToValidate="radSLA" ErrorMessage="Please select if service agreement is applicable or not."
Enabled="true" Display="none"></asp:RequiredFieldValidator>
<%-- </fieldset>--%>
</td>
</tr>
<tr>
<td class="frmlblBold" style="text-align:right;vertical-align:top">Comments </td>
<td style="vertical-align:top">
<asp:TextBox runat="server" ID="txtActionComments" MaxLength="500" TextMode="MultiLine" width="95%" Rows="5" /> </td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" CssClass="btnOther" />
</tr>
</asp:Panel>
<asp:XmlDataSource ID="dsSLA" runat="server" EnableCaching="false" DataFile="~/XML/VisaTracking.xml"
XPath="BVILetter/SLA/ITEM" />
Code in .cs file:
if (!IsPostBack)
{
base.PageLoad();
GetReqPndActTknByMe(base.LogShortID);
radSLA.DataBind();
radSLA.SelectedValue = "Yes";
BindDataToDropdownListAction();
}
I am able to see the row count of radSLA.DataBind(); as '2'
My XML code:
<BVILetter>
<SLA>
<ITEM SLAID ="Yes" SLADESC ="Yes" />
<ITEM SLAID ="No" SLADESC ="No" />
</SLA>
</BVILetter>
But I am not able to see the radio buttons in my screen:
Please help me.
Please Check the Binding function clearly. If binding not happened properly then RadioBottonList does not appear.RadioBottonList apear only when when listItem bind properly

AJAX :: Tabcontainer Doesn't Show Tabs In Properlly?

i am using TabContainer Control of AjaxToolkit for asp.net but when i using it in my project it doesn't shows properly. i googled much but can't find proper solution see below image please help me.
CODE:
<asp:TabContainer ID="TabContainer1" runat="server">
<asp:TabPanel ID="tbpnluser" runat="server">
<HeaderTemplate>
Item Detail</HeaderTemplate>
<ContentTemplate>
<asp:Panel ID="itemDetailGrdPanel" runat="server">
<asp:GridView ID="grdItemDetail" runat="server" AutoGenerateColumns="False" OnRowCreated="gridView_RowCreated"
GridLines="None" OnRowDataBound="gridView_RowDataBound" CellPadding="4" ForeColor="#333333"
AllowPaging="True" PageSize="5" AutoGenerateSelectButton="True" >
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:BoundField HeaderText="Item Code" DataField="ItemCode">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
</asp:BoundField>
<asp:BoundField HeaderText="Item Description" DataField="ItemDescription">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="150px" />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="150px" />
</asp:BoundField>
<asp:BoundField HeaderText="Detail" DataField="ItemDetail">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" />
</asp:BoundField>
<asp:BoundField HeaderText="Quantity" DataField="Quantity">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" />
</asp:BoundField>
</Columns>
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
</asp:GridView>
</asp:Panel>
<asp:Panel ID="itemDetailEditPanel" runat="server">
<table align="left" style="width: 187px">
<tr>
<td>
</td>
<td align="left">
Item Code:
</td>
<td>
<asp:TextBox ID="txtItemCode" runat="server" ReadOnly="True"></asp:TextBox>
</td>
<td>
<asp:Button ID="btnFindItemCode" runat="server" Text="Find" />
</td>
</tr>
<tr style="height:70px; vertical-align:top; ">
<td>
</td>
<td >
Item Description:
</td>
<td>
<asp:TextBox ID="txtItemDescription" runat="server" Height="54px"></asp:TextBox>
</td>
</tr>
<tr style=" vertical-align:top; ">
<td>
</td>
<td >
Item Detail:
</td>
<td>
<asp:TextBox ID="txtItemDetail" runat="server" Height="23px"></asp:TextBox>
</td>
</tr>
<tr style=" vertical-align:top; ">
<td>
</td>
<td >
Quantity:
</td>
<td>
<asp:TextBox ID="txtQuantity" runat="server" Height="23px"></asp:TextBox>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:TabPanel>
<asp:TabPanel ID="tbpnlusrdetails" runat="server">
<HeaderTemplate>
User Details</HeaderTemplate>
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server">
<table align="center">
<tr>
<td align="right" colspan="2">
</td>
<td>
<b>User Details</b>
</td>
</tr>
<tr>
<td align="right" colspan="2">
UserName:
</td>
<td>
<b>Suresh Dasari</b>
</td>
</tr>
<tr>
<td align="right" colspan="2">
FirstName:
</td>
<td>
<b>Suresh</b>
</td>
</tr>
<tr>
<td align="right" colspan="2">
LastName:
</td>
<td>
<b>Dasari</b>
</td>
</tr>
<tr>
<td align="right" colspan="2">
Email:
</td>
<td>
<b>sureshbabudasari#gmail.com</b>
</td>
</tr>
<tr>
<td align="right" colspan="2">
Phone No:
</td>
<td>
<b>1234567890</b>
</td>
</tr>
<tr>
<td align="right" colspan="2">
Location:
</td>
<td align="left">
<b>Hyderabad</b>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:TabPanel>
<asp:TabPanel ID="tbpnljobdetails" runat="server">
<HeaderTemplate>
Job Details</HeaderTemplate>
<ContentTemplate>
<asp:Panel ID="Panel2" runat="server">
<table align="center">
<tr>
<td>
</td>
<td align="right">
</td>
<td>
<b>Job Details</b>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
Job Type:
</td>
<td>
<b>Software</b>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
Industry:
</td>
<td>
<b>IT</b>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
Designation:
</td>
<td>
<b>Software Engineer</b>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
Company:
</td>
<td>
<b>aspdotnet-suresh</b>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
Phone No:
</td>
<td>
<b>1234567890</b>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
Location:
</td>
<td align="left">
<b>Hyderabad</b>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:TabPanel>
</asp:TabContainer>
Try to use (also) the HeaderText property:
<asp:TabPanel ID="tbpnluser" runat="server" HeaderText="Item Detail">
<HeaderTemplate>
Item Detail</HeaderTemplate>
<ContentTemplate>
For the panel itemDetailEditPanel use this markup:
<asp:Panel ID="itemDetailEditPanel" runat="server" style="display: table-cell;align: left;">
<table style="width: 187px;">
I found that if my browser was in Compatibility mode, I would get this, but in Standards mode, it worked fine. After a bunch of hacking, I found this workaround for Compatibility mode:
Try adding this to your style tag:
/* Deals with TabPanel height issue in Compatibility mode */
.ajax__tab_xp .ajax__tab_header .ajax__tab_tab
{
height: 22px !important;
}
the !important helps because something else was shrinking the height, causing the whitespace to appear below. !important ensures that your code takes priority.

Default button not triggered in Panel

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

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