日期:2014-05-17  浏览次数:20739 次

html页面 调用cs页面的“选择评分等级图片”的方法
html页面:
  <%# Getpjstar(Eval("pj"))%>

从首页面:
  
  //评分图片选择
        public string Getpjstar(object pj)
        {
            switch (pj.ToString())
            {
                case "1":
                    return "<img src='images/pingji/1.gif' />";
                    break;
                case "2":
                    return "<img src='images/pingji/2.gif' />";
                    break;
                case "3":
                    return "<img src='images/pingji/3.gif' />";
                    break;
                case "4":
                    return "<img src='images/pingji/4.gif' />";
                    break;
                case "5":
                    return "<img src='images/pingji/5.gif' />";
                    break;
                default:
                    return "";
                    break;

            }
        }