<pre lang="xml">protected void ListView1_OnItemDeleting(object sender, ListViewDeleteEventArgs e) { int id = int.Parse(ListView1.DataKeys[e.ItemIndex].Value.ToString()); Label a = (Label)ListView1.EditItem.FindControl(Label1); . . . . </pre> <pre lang="HTML"> <asp:ListView ID="ListView1" DataKeyNames="ID_Pic" RepeatColumns="5" RepeatDirection="Horizontal" DataKeyField="ID_Pic" OnItemEditing="ListView1_OnItemEditing" OnItemCanceling="ListView1_OnItemCanceling" OnItemUpdating="ListView1_OnItemUpdating" OnItemDeleting="ListView1_OnItemDeleting" runat="server" OnPreRender="ListView1_OnPreRender"> <LayoutTemplate> <div> <ul class="hoverbox"> <asp:PlaceHolder ID="itemPlaceholder" runat="server" /> </ul> </div> </LayoutTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Visible="False" Text='<%# Eval("PinNameMD5") %>'></asp:Label> <asp:Label ID="lbl2ID_Pic" runat="server" Visible="False" Text='<%# Eval("ID_Pic") %>'></asp:Label> <li> <div style="width: auto; height: auto;"> <a > <img src='<%# Eval("PinNameMD5") %>' alt='<%# Eval("Alt_Txt") %>' /> <img src='<%# Eval("PinNameMD5") %>' alt='<%# Eval("Alt_Txt") %>' class="preview" /> . . . . </pre>
Label a= (Image)e.Item.FindControl("Label1");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)