<ul id="example2"> <%csharp%> DTcms.BLL.photo bll = new DTcms.BLL.photo(); DTcms.Model.photo modelpic = bll.GetModel(46); <%/csharp%> <%if modelpic.photo_albums!=null%> <%loop (DTcms.Model.photo_album) modelt1 modelpic.photo_albums%> <li><a href="javascript:;"><img bimg="{modelt1.big_img}" src="{modelt1.small_img}" /></a></li> <%/loop%> <%/if%> </ul> |
<%csharp%>标签内写原生的C#代码,第一步建立bll实例,再用getmodel返回指定ID图文的model对象,然后再返回图文相应的图库model集合,再进行遍历