这是ASPX里的代码
复制代码 代码如下:
<asp:Repeater ID="OrderList" runat="server">
         <ItemTemplate>
          <%#this.info(Eval("id").ToString(), Eval("id").ToString())%>
         </ItemTemplate>
</asp:Repeater>

下面是CS里代码
复制代码 代码如下:
protected void Page_Load(object sender, EventArgs e)
    {   
        .......
    }
protected string info(string id)
    {
        switch (num)
        {
            case "0":
                returnStr = "ID为0";
                break;
            case "1":
                returnStr = "ID为1";
                break;
            case "2":
                returnStr = "ID为2";
                break;
            case "3":
                returnStr = "ID为3";
                break;
            case "4":
                returnStr = "ID为3";
                break;
        }
        return returnStr;
    }

华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com