如何转换代码<a to="" asp:hyperlink="" control="" inside="" listview=""

时间:2016-02-02 15:13:02

标签: c# html asp.net

="" i want to convert tag <a> by asp:HyperLink control inside listview to get current value of item .

<asp:ListView ID="ColorListView" runat="server" DataSourceID="ProductColorsDS" OnItemCommand="ColorListView_ItemCommand">
    <ItemTemplate>
        <a href="<%=ConfigurationManager.AppSettings["ProductsColorsVBPath"].ToString() %><%# Eval("PictureName") %>" class="colorss" rel="enlargeimage" rev="targetdiv:loadarea2,trigger:click,preload:none,fx:fade">
            <asp:Label ID="ColorLabel" runat="server" Text="" CssClass="labelcolor" BackColor='<%# System.Drawing.ColorTranslator.FromHtml(Eval("ColorCode").ToString()) %>'></asp:Label>
            <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Eval("ColorID") %>' />
        </a>
    </ItemTemplate>
    <LayoutTemplate>
        <tr runat="server" id="itemPlaceholder"></tr>
    </LayoutTemplate>
</asp:ListView>

0 个答案:

没有答案