• 2007.08.24 C#工作随笔


    ShoppingCart.aspx
       <script language="c#" runat="server">
          static int i;
          static int d=1;
          static int n;
          
          void typeid()
           {
             String type=Request.Params["type"];       
             Response.Write(type);
             while((i<n)||(i==0))
               {i++;} 
             Response.Write(i);
             Response.Write("&nbsp;");
             Session["id"+i]=Request.Params["type"];
             Response.Write("&nbsp;");
             Response.Write(Session["id"+i]);
             n=i; 
           }
          void type()
          {
            String type=Request.Params["type"];       
            Response.Write(type);
          }
     
          void list()
           { Response.Write(Session["id"+d]);
             d++;
           }
     
          void clear()
           {
            while(n>=0)
             {Session.Remove("id"+n);
              n--;}
            i=0;
            n=0;
           }
    </script>
     
    在中间列表中加了一列:
    <TD width="60px"><b>Type</b></TD>
    <TD width="60px"><%//#Container.ItemIndex+1%>&nbsp;<%list();%></TD>

  • 相关阅读:
    P1215 [USACO1.4]母亲的牛奶 Mother's Milk
    P2966 [USACO09DEC]牛收费路径Cow Toll Paths
    P2419 [USACO08JAN]牛大赛Cow Contest
    1085 数字游戏
    P1983 车站分级
    P1346 电车(dijkstra)
    P1196 银河英雄传说(加权并查集)
    P1195 口袋的天空
    3027 线段覆盖 2
    codevs 1214 线段覆盖/1643 线段覆盖 3
  • 原文地址:https://www.cnblogs.com/limshirley/p/1498527.html
Copyright © 2020-2023  润新知