我要在模式弹出扩展器中显示转发器,我能够绑定值,一切正常,但是当弹出窗口显示时,它不会显示转发器。
这是我的代码:
<div id="dummy" runat="server">
</div>
<ajaxToolkit:ModalPopupExtender runat="server" ID="mpeOIR" TargetControlID="dummy"
PopupControlID="pnlOIR_View" DropShadow="true" CancelControlID="btn_modal_cancel" />
<asp:Panel ID="pnlOIR_View" runat="server" BackColor="WhiteSmoke" Height="600px" Width="600px"
Style="display: none">
<div class="titl-bg" style="width: 580px;">
<div class="cont-title" style="width: 580px;">
LIST OF OIR CREATED
</div>
</div>
<div id="RPT">
<table cellpadding="0" cellspacing="0">
<asp:Repeater ID="rptr_OIR_view" runat="server" OnItemCommand="rptr_OIR_ItemCommand"
OnItemDataBound="rptr_OIR_ItemDatabound">
<HeaderTemplate>
<tr>
<th>
OIR NO
</th>
<th>
INCIDENT DATE
</th>
<th>
EMPLOYEE NAME
</th>
<th>
AGE
</th>
<th>
DEPARTMENT NAME
</th>
<th>
INJURY LOCATION
</th>
<th>
VIEW
</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<%# Eval("OIR_NO")%>
</td>
<td>
<%# Eval("INCIDENT_DATE")%>
</td>
<td>
<%# Eval("FIRSTNAME")%>
</td>
<td>
<%# Eval("DEPARTMENTNAME")%>
</td>
<td>
<%# Eval("LOCATIONNAME")%>
</td>
<td>
<asp:ImageButton ID="imgbtn_OIR_view" runat="server" CommandName="view" CausesValidation="false"
ImageUrl="~/Images/download_arrow.png" Width="20px" Height="20px" CommandArgument='<%# Eval("OIR_NO")%>' />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</div>
</asp:Panel>
以下是我为弹出窗口所做的工作:
protected void ReporterCancelClick(object sender, EventArgs e)
{
using (EHSIMSDataContext db = new EHSIMSDataContext())
{
var _OIR_view = (from oir in db.OCCUPATIONAL_INJURY_REPORTs
join e in db.EMPLOYEEs on oir.EMPLOYEE_ID equals e.EMPLOYEE_ID
join d in db.DEPARTMENTs on oir.DEPARTMENT_ID equals d.DEPARTMENT_ID
join l in db.LOCATIONs on oir.INJURY_LOCATION_ID equals l.LOCATION_ID
select new
{
oir.OIR_NO,
oir.INCIDENT_DATE,
e.FIRSTNAME,
DEPARTMENTNAME= d.NAME,
LOCATIONNAME= l.NAME
}).ToList();
rptr_OIR_view.DataSource = _OIR_view;
rptr_OIR_view.DataBind();
mpeOIR.Show();
}
}