在数据库列中插入多个文件上载文件作为超链接
问题描述:
foreach (HttpPostedFile postedFile in fudoc.PostedFiles)
{
doc = Path.GetFileName(postedFile.FileName);
postedFile.SaveAs(System.IO.Path.Combine(Server.MapPath("~/Document/"), doc));
docName += String.Format("{0}", doc);
}
//字符串插入查询。 .... //请帮帮我如何在数据库中的单个列中插入多个文件作为超链接。 // thanks
//string insert query..... //please help me out. how to insert multiple files in single column in database as a hyperlink. //thanks
答
将所有链接存储为以逗号分隔的列,而fetch则根据逗号分隔字符串。
Store all the link as comma separated in a column, while fetch break the string based on comma.