`
aksoft
  • 浏览: 44058 次
  • 性别: Icon_minigender_1
  • 来自: 河北
社区版块
存档分类
最新评论

智网属性调用

    博客分类:
  • C#
阅读更多
分二步操作:
一:网站后台的操作:

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() )%>
放在你要的地方
分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

Global site tag (gtag.js) - Google Analytics