在datalist实现图片产生链接

<asp:DataList ID="DataList2" runat="server" RepeatColumns="6"
        RepeatDirection="Horizontal">
        <ItemTemplate>
            <br />
           <a href='<%# "previewGoodWork.aspx?goodworkpicturepath="+DataBinder.Eval(Container.DataItem,"goodworkpicturepath") %>' OnCommand="ImageButton1_Command" ImageUrl='<%# Eval("goodworkpicturepath") %>' > <asp:Image ID="Image3" runat="server" ImageUrl='<%# Eval("goodworkpicturepath") %>' /></a>&nbsp;
            <br />
        </ItemTemplate>
    </asp:DataList>

posted @ 2008-07-14 13:51  洗碗心得  阅读(425)  评论(0编辑  收藏  举报