0
火
我的代碼是itemcommand在數據列表圖像按鈕不會在第一次點擊
<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事件,但在第二次點擊大火,
我有這個DataList控件在用戶控件(的.ascx) 數據列表是 Default.aspx的==> view.ascx ==> docLink.asx
我調用window.open