• Advertisement
Sign in to follow this  

Using Data Binding

This topic is 4410 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ???
<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>



[Edited by - jad_salloum on January 28, 2006 6:52:22 AM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement