Original Post
hi guys i have a DataList that contains buttons and these buttons are binded to a DataSet, so what i want to do is when i click a Button in this DataList i want it to take the path of the image from a field called "Path" in the DataSet and pass this ImageUrl to the Image1 i have created outside the DataList. can anyone help me with this ???? what i should correct with the code ?? how to put in the button event onclick a function that gets the field "Path" and give it to the imageurl ??? [Edited by - jad_salloum on January 28, 2006 6:52:22 AM]
<asp:image id="Image1" runat="server" Width="320px" Height="224px"></asp:image>
<asp:datalist id="DataList1" runat="server" AlternatingItemStyle-Wrap="True" RepeatDirection="Horizontal">
<ItemTemplate>
<TABLE id="Table8" cellSpacing="0" cellPadding="0" width="47" border="0">
<TR>
<TD vAlign="middle" align="center" width="40">
<asp:Button id=Button1 runat="server" Width="35px" Font-Size="Medium" Font-Bold="True" Text='<%# DataBinder.Eval(Container.DataItem, "text") %>' BackColor="#FFC080" >
</asp:Button></TD>
<TD vAlign="middle" align="center" width="7">
<asp:Panel id="Panel1" runat="server" Width="1px" Height="26px" BackColor="Silver"></asp:Panel></TD>
</TR>
</TABLE>
</ItemTemplate>
</asp:datalist>