Try like below, it will help you...
SQL FIDDLE : http://www.sqlfiddle.com/#!3/96a49/18
SQL :
SELECT CrateTitle,CrateDescription,CrateID,
stuff(
(
SELECT ',<a href=''' + [FruitWebsite] + ''' target=''_blank''>'+ [FruitTitle] +'</a>' FROM fruits WHERE CrateID = t.CrateID FOR XML path('')
),1,1,' ') Types_of_Fruits_in_Crate
FROM (SELECT DISTINCT CrateTitle,CrateDescription,CrateID FROM fruits )t
Also, Add HTML ENCODE = FALSE in your Code then only the HTML functionality reflect in your Grid View
C# :
BoundField theField = new BoundField();
theField.DataField = "Types_of_Fruits_in_Crate";
theField.HtmlEncode = false;
gv.Columns.Add(theField);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…