<script language="javascript" type="text/javascript">
function ShowEditModal(Eid) {
var frame = $get('IframeEdit');
frame.src = "View_Batch.aspx?ID=" + Eid;
//frame.scrolling=true;
frame.height = 800;
frame.width = 550;
$find('EditModalPopup').show();
}
script>
<asp:UpdatePanel ID="updpnlBatch" runat="server">
<ContentTemplate>
<asp:Repeater ID="rptBatch" runat="server" EnableViewState="True" OnItemCommand="rptBatch_ItemCommand"
OnItemDataBound="rptBatch_ItemDataBound">
<HeaderTemplate>
<table border="0" cellpadding="4" cellspacing="1" width="98%">
<td align="left" bgcolor="#C1C5B8" class="white" width="16%">
<b>Editb>
td>
tr>
table>
HeaderTemplate>
<ItemTemplate>
<table border="0" cellpadding="4" cellspacing="1" width="98%">
<tr>
<td align="left" class="hometext10" width="16%" bgcolor="#f5f5f5">
<asp:LinkButton ID="lnkbtnBatch" runat="server" CssClass="orange">View/ Editasp:LinkButton>
td>
tr>
table>
ItemTemplate>
asp:Repeater>
ContentTemplate>
asp:UpdatePanel>
<asp:Button ID="btnBatchEditt" runat="server" Text="Referee Report" Style="display: none" />
<cc1:ModalPopupExtender ID="mpexBatch" runat="server" BackgroundCssClass="modalBackground"
CancelControlID="btnBatchEditCancel" OkControlID="btnBatchEditDone" TargetControlID="btnBatchEditt"
PopupControlID="DivEditWindow" BehaviorID="EditModalPopup">
cc1:ModalPopupExtender>
<div class="popup_Buttons" style="display: none">
<input id="btnBatchEditDone" value="Done" type="button" />
<input id="btnBatchEditCancel" value="Cancel" type="button" />
div>
<div id="DivEditWindow" style="display: none;">
<iframe id="IframeEdit" frameborder="0" width="400">iframe>
div>
ON .CS :
protected void rptBatch_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
LinkButton LbtnBatch = (LinkButton)e.Item.FindControl("lnkbtnBatch");
LbtnBatch.Attributes.Add("onClick", "ShowEditModal('" + id + "');");
}
}
the modelpopup close with in seconds
Vishal GilbilePosted Mar 11, 2013, 6:13 AM
If the issues is something with postback then kindly replace the following line of code
LbtnBatch.Attributes.Add("onClick", "ShowEditModal('" + id + "');");
With
LbtnBatch.Attributes.Add("onClick", "javascript:return ShowEditModal('" + id + "');");
and in your function return false;
<script language="javascript" type="text/javascript">
function ShowEditModal(Eid) {
var frame = $get('IframeEdit');
frame.src = "View_Batch.aspx?ID=" + Eid;
//frame.scrolling=true;
frame.height = 800;
frame.width = 550;
$find('EditModalPopup').show();
return false;
}
script>
Hope that solves your problem.
With Regards,
Vishal Gilbile.
Anusha SrivastavaPosted Mar 11, 2013, 6:41 AM
Anusha SrivastavaPosted Mar 11, 2013, 5:08 AM
Anusha SrivastavaPosted Mar 11, 2013, 5:02 AM
Owner: <%#DataBinder.Eval(Container.DataItem, "OwnerId")%>
Product: <%#DataBinder.Eval(Container.DataItem, "Product")%>
Batch Start Date: <%=Startdate %>
Batch Finish Date: <%=Finishdate%>
Exame Due Date: <%=Examedate%>
Batch Location: <%#DataBinder.Eval(Container.DataItem, "Location")%>
Description: <%#DataBinder.Eval(Container.DataItem, "Description")%>
Pramotional: <%#DataBinder.Eval(Container.DataItem, "Promotional")%>
Vishal GilbilePosted Mar 11, 2013, 4:58 AM
Your Repeater control layout is not proper, kindly go through the following link it may help you.
http://www.c-sharpcorner.com/UploadFile/17e8f6/repeater-control-in-Asp-Net/
With Regards,
Vishal Gilbile.