我正在使用ModelPopUpExtender,以便在单击按钮时生成弹出框。我把按钮放在桌子里面。以下代码有什么问题?我通过直接调用DIV标记做了同样的事情。它完美的工作。当我在表格元素中添加按钮时,会出现以下问题。
<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="Panl1"
TargetControlID="unlockbutton"
CancelControlID="Button2" BackgroundCssClass="Background">
</cc1:ModalPopupExtender>
<asp:Panel ID="Panl1" runat="server" CssClass="Popup" align="center"
style = "display:none">
<iframe style=" width: 350px; height: 300px;" id="irm1"
src="PopUp.aspx" runat="server"></iframe>
</asp:Panel>
<asp:ListView runat="server" ID="ResultsListView"
DataKeyNames="PatientCompletedID"
OnItemCommand="ResultsListView_ItemCommand">
<LayoutTemplate>
<fieldset class='ui-widget-content'>
<legend>Results</legend>
<table id="results">
<tr>
<td class="ui-state-active">Col1</td>
<td class="ui-state-active">Col2</td>
<td class="ui-state-active">Col3</td>
<td class="ui-state-active">Col4</td>
<td class="ui-state-active">Col5</td>
<td class="ui-state-active">Col6</td>
<td class="ui-state-active">Col7</td>
<td class="ui-state-active">Col8</td>
</tr>
<asp:PlaceHolder ID="itemPlaceholder" runat="server">
</asp:PlaceHolder>
</table>
</fieldset>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td style="text-align:left;"><%#Eval("Col1") %></td>
<td style="text-align:left;"><%#Eval("Col2") %></td>
<td><%#Eval("Col3")%></td>
<td><%#Eval("Col4")%></td>
<td><%#Eval("Col5","{0:d}")%></td>
<td><%#Eval("Col6","{0:MM/dd/yyyy hh:mm:ss}")%></td>
<td><%#Eval("Col7")%></td>
<td><asp:Button CssClass="ui-button ui-widget ui-state-
default ui-corner-all ui-button-text-only"
runat="server"
ID="unlockbutton"
CommandName="unlock"
CommandArgument="unlock"
Text="Unlock"></asp:Button>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<ItemTemplate>
<tr style="background:white">
<td style="text-align:left;"><%#Eval("Col1") %></td>
<td style="text-align:left;"><%#Eval("Col2") %></td>
<td><%#Eval("Col3")%></td>
<td><%#Eval("Col4")%></td>
<td><%#Eval("Col5","{0:d}")%></td>
<td><%#Eval("Col6","{0:MM/dd/yyyy hh:mm:ss}")%></td>
<td><%#Eval("Col7")%></td>
<td><asp:Button CssClass="ui-button ui-widget ui-state-
default ui-corner-all ui-button-text-only" runat="server"
ID="unlockbutton" CommandArgument="unlock" Text="Unlock">
</asp:Button></td>
</tr>
</ItemTemplate>
</AlternatingItemTemplate>
<EmptyDataTemplate>
<div style="color:Red">No results found</div>
</EmptyDataTemplate>
</asp:ListView>