我一直在使用 string.format 在互联网上搜索我的代码,但似乎找不到与我的代码类似的正确代码。
DataColumn dtCol;
dtCol = new DataColumn("ImagePath", System.Type.GetType("System.String"));
dtImages.Columns.Add(dtCol);
dtImages.Columns["ImagePath"].Expression = string.Format("<a href=\"'{0}'+ImageFilename\">View Image</a>", ImageDownloadPath);
(ImageFilename 是我的数据库表上的一列)上面的代码总是抛出“语法错误:'<' 运算符之前缺少操作数”的错误
我该如何正确地做到这一点?