我的代码是
<asp:DataList EnableTheming="false" ID="dlDocument" ShowHeader="false" ShowFooter="false"
RepeatColumns="3" runat="server" OnItemCommand="dlDocument_ItemCommand" DataKeyField="Id"
RepeatDirection="Horizontal" OnItemDataBound="dlDocument_ItemDataBound">
<ItemTemplate>
<table border="0" cellpadding="0" cellspacing="0" dir="ltr" align="center">
<tr>
<td class="C2-TL"></td>
<td class="C2-TM"></td>
<td class="C2-TR"></td>
</tr>
<tr>
<td class="C2-LM">
</td>
<td class="C2-Content">
<table width="110" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center" valign="top" width="14">
<asp:ImageButton ToolTip="ویرایش" ID="btnUpdate" CommandName="Update" runat="server" Height="12px" OnClientClick="editDocList(<%#((Document)Container.DataItem).Id%>)"
Width="12px" ImageUrl="/App_Themes/Default/Images/GridIcons/Grid-Edit.png" />
<br />
<asp:ImageButton ToolTip="حذف" OnClientClick="javascript:return confirm('آیا مطمئن به حذف هستید؟');return false;"
ID="btnDelete" CommandName="Delete" runat="server" Height="12px" Width="13px"
ImageUrl="/App_Themes/Default/Images/GridIcons/Grid-delete.png" />
</td>
<td align="center" rowspan="2">
<asp:Label ID="lblImg" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td align="center" valign="top" width="16">
<a href="javascript:" title="چاپ تصویر در اندازه A4" onclick='SendToPrint("<%#"/Handlers/ImageHandler.ashx?id=" +((Document)Container.DataItem).Id%>");'>
<img alt="چاپ تصویر" src="<%=Radyn.Contracts.Application.Settings.DNNPath %>/Images/GridIcons/print.png" border="0" height="16"
width="16" />
</a>
</td>
</tr>
<tr>
<td width="14"></td>
<td align="center" height="25">
<asp:Label ID="lblDesc" runat="server"></asp:Label>
</td>
</tr>
</table>
</td>
<td class="C2-RM">
</td>
</tr>
<tr>
<td class="C2-BL2"></td>
<td class="C2-BM2"></td>
<td class="C2-BR2"></td>
</tr>
</table>
</ItemTemplate>
问题是当我在第一次单击时单击图像按钮编辑或删除时不会触发 itemcommand 事件,但在第二次单击时会触发
我在 usercontrol(.ascx) 中有这个数据列表,数据列表在 default.aspx==>view.ascx==>docLink.asx
我在 window.open 中调用 default.aspx