Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

imagebutton in itemtemplate of datalist inside updatepanel not firing

$
0
0

It was working nicely and I then tackled the problem of getting the datalist paging. Once that was done I found the imagebutton event wasn't firing any more. No idea what I changed.

Here is the aspx that I think is relevant;

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:UpdatePanel ID="UpdatePanel1" runat="server" ><ContentTemplate ><asp:Image ID="imgShow" runat="server" ImageUrl="~/images/20.jpg" /><table width="100%" border="0"><tr><td>&nbsp;&nbsp;<asp:label id="lblCurrentPage" runat="server"></asp:label></td></tr><tr><td>&nbsp;&nbsp;<asp:button id="cmdPrev" runat="server" text=" << " onclick="cmdPrev_Click"></asp:button>&nbsp;<asp:button id="cmdNext" runat="server" text=" >> " onclick="cmdNext_Click"></asp:button></td></tr></table><table border="1"><asp:DataList ID="dtlist" runat="server" RepeatColumns="4" CellPadding="5"
        Width="343px"><ItemTemplate><asp:ImageButton OnCommand="ImageButton_Command" Height="70" ID="ImageButt" ImageUrl='<%# Bind("Name", "~/images/{0}") %>' runat="server" CommandName="ShowImage" CommandArgument='<%# Bind("Name", "~/images/{0}") %>' /><br /><asp:label ID="fname" Text='<%# Bind("Name") %>'  runat="server" Font-Size="XX-Small" /></ItemTemplate><ItemStyle BorderStyle="None" BorderWidth="0px" HorizontalAlign="Center" VerticalAlign="Bottom" Wrap="False" /></asp:DataList>

I've tried using Onclick instead of Oncommand. I've also tried adding the imagebutton as a trigger to the updatepanel but get an error that the control id cannot be found. So I tried to find the uniqueID using code behind in the page_load event but this couldn't find it either. I'd very little hair left before this ....


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>