2

下面的代码,当我检查表格中呈现的 url 时,我看到了类似

http://mysite1, http://mysite1

所以它重复了,我不确定我做错了什么

 HyperLinkField biPowerLink = new HyperLinkField();
            biPowerLink.DataNavigateUrlFields = new string[] { "Link" };
            biPowerLink.HeaderText = "Link";
            biPowerLink.Text = @"<img src='" + ResolveUrl("/_layouts/15/xx/xx/Images/iclient.gif") + "' /> ";
            linkedJobsGrid.Columns.Add(biPowerLink);
4

1 回答 1

2
 var firstCell = e.Row.Cells[0];
 firstCell.Controls.Clear();
 firstCell.Controls.Add(new HyperLink { "URL", "URL"});
于 2013-06-11T13:27:57.850 回答