智网属性调用

分二步操作:
一:网站后台的操作:

1:先在网站的后台,产品展示--“属性管理”里添加好属性
2:产品展示--“类别管理”里的“属性模版”里选择好你刚才添加的的属性的

二:页面列表页的调用:
1: 1:在Product文件夹里的“ProductList.ascx”
在<script language="c#" runat="server">
...........

...........
"checked" : "";
        }



这后面加上这一段代码

public string GetPE(string strid) 
        {
            string str = "";
            IList<Smartsite.Product.Model.ProductExtendInfo> lpei = Smartsite.Product.BLL.ProductExtend.GetExtendPropertyByProductID(int.Parse(strid));
            for (int i = 0; i < lpei.Count; i++)
            {
                str += lpei[i].filedvalue+"<br/>";
            }
            return str;
        }



2:在你要调用的地方加上这一段代码就可以了

<%# GetPE(Eval( "productid").ToString() )%>

放在你要的地方




posted @ 2010-10-21 10:20  aksoft  阅读(194)  评论(0)    收藏  举报