發(fā)表日期:2019-04 文章編輯:小燈 瀏覽次數(shù):3445
1、調(diào)用附件組或圖片組數(shù)據(jù)列表。
Html.AttachmentDataList(new?{})
下面直接上演示代碼,調(diào)用product表(信息表)的images字段(字段類型為圖片組)對應(yīng)的附件表數(shù)據(jù)。
<ul> ????@foreach?(var?item?in?Html.AttachmentDataList(new?{?ParentId=1,?ParentTable?=?"product",?ParentField?=?"images"?})) ????{ ????<li> ????????<img?src="@item.Path"?alt="獲取文件路徑"?/> ????????<img?src="@item.Thumbnail"?alt="圖片縮列圖路徑,附件組此字段為空"?/> ????</li> ????} </ul>
重要參數(shù):
ParentId:父級表的Id
ParentTable:父級表的名稱
ParentField:父級表對應(yīng)字段
日期:2019-04 瀏覽次數(shù):3187
日期:2019-04 瀏覽次數(shù):3175
日期:2019-04 瀏覽次數(shù):3081
日期:2019-04 瀏覽次數(shù):2901
日期:2019-04 瀏覽次數(shù):2997
日期:2019-04 瀏覽次數(shù):3152
日期:2019-04 瀏覽次數(shù):3097
日期:2019-04 瀏覽次數(shù):3359
日期:2019-04 瀏覽次數(shù):3421
日期:2019-04 瀏覽次數(shù):3054
日期:2019-04 瀏覽次數(shù):3444
日期:2019-04 瀏覽次數(shù):2855
日期:2019-04 瀏覽次數(shù):2996
日期:2019-04 瀏覽次數(shù):3115
日期:2019-04 瀏覽次數(shù):2963
日期:2019-04 瀏覽次數(shù):3409
日期:2019-04 瀏覽次數(shù):3328
日期:2019-04 瀏覽次數(shù):2993
日期:2019-04 瀏覽次數(shù):3227
日期:2019-04 瀏覽次數(shù):3055
日期:2019-04 瀏覽次數(shù):2818
日期:2019-04 瀏覽次數(shù):3124
日期:2019-04 瀏覽次數(shù):3024
日期:2019-04 瀏覽次數(shù):3115
日期:2019-04 瀏覽次數(shù):3078
日期:2019-04 瀏覽次數(shù):2951
日期:2019-04 瀏覽次數(shù):2799
日期:2019-04 瀏覽次數(shù):2807
日期:2019-04 瀏覽次數(shù):2875
日期:2019-04 瀏覽次數(shù):2896
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.