Manoj Bisht

Manoj Bisht

  • NA
  • 135
  • 0

Stop Popup window

Jun 19 2009 3:47 AM

Hello Friends,
I've a DataList in this DataList i've a Div onclick this Div a popup window opens. And also this div holds some Labelsto display the data and a Button onclick this button a Image Ur is displayed.
But the problem is as i click on this Button, Image Url is displayed but a popup windowis also opened. But i want if i click on Button only ImageUrl is to be displayed otherwise popup window should be opened
 
Here is my code
 
<asp:DataListID="DataList1"runat="server"onitemcommand="DataList1_ItemCommand">
<ItemTemplate><divid="myDiv"runat="server"class="ARough"onclick="window.open('Admin/Default.aspx','myWindow','width=200,height=200');">
<tableborder="1"cellpadding="0"cellspacing="0"width="100%">
<tr>
<tdstyle="width:200px">
<asp:LabelID="lblID"runat="server"Text='<%#Eval("ID") %>'></asp:Label>
</td>
<tdstyle="width:200px">
<asp:LabelID="lblAlternateText"runat="server"Text='<%#Eval("AlternateText") %>'></asp:Label>
</td>
<td>
<asp:ButtonID="cmdShow"CommandName="Show"runat="server"Text="Show Image Url"/>
<asp:LabelID="lblImageUrl"Visible="false"runat="server"Text='<%#Eval("ImageUrl") %>'></asp:Label>
</td>
</tr>
</table></div>
</ItemTemplate>
</asp:DataList>