将链接添加到axcs.cs中的图像

问题描述 投票:0回答:1

我想做的是将链接添加到图像。

该代码在isPackage为true时使用。我的axcs文件上的图像可见性将可见。但是我想做的是使图像可见,并在下面的标签上提供类似的链接。

这是我的isPackage的代码。

 if (wli.isPackage)
     ((Image)dvLineItems.FindControl("imgPack")).Visible = true;

这是标签的代码。

((Label)dvLineItems.FindControl("Product")).Text = "<a href='#' onClick='javascript:ImageUpWindow(" + wli.OrderNumber + ")'>" + wli.ProductNo + "</a>";

我该怎么做?在此先感谢:)

c# asp.net
1个回答
0
投票

我认为在这种情况下,您将使用链接按钮,然后将Command和Command Argument属性设置为您的规范。

© www.soinside.com 2019 - 2024. All rights reserved.