zoukankan      html  css  js  c++  java
  • C# Code in ASPX Page

    ASPX:
    <%@ Page %>
    <HTML>
     <Title>使用全站点计数器</Title>
     <!--#Include file="GlobCount.inc"-->
     <script language="c#" runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    {
      if(!IsPostBack)
                     GlobalGraph(MyPanel);   
    }
     </script>

     <BODY bgColor="white">
      <font face="楷体_GB2312"><strong>全站点计数器</strong></font>
      <form runat="server">
       <asp:Panel id="MyPanel" runat="server" width="50%" BorderColor="#C0FFC0" BorderStyle="Groove"></asp:Panel>
      </form>
      </FORM>
     </BODY>
    </HTML>

    GlobCount.inc:
    <script language=c# runat="server">
     void GlobalGraph(Panel Container)
     {
            Image Img;
            Label lbl;
            string count  ;
            String graph;
            lbl=new Label();
            lbl.Text="该站点已被访问次数:";
            Container.Controls.Add(lbl);
            count =Application["Counter"].ToString();
            for (int i=0;i<count.Length;i++)
            {
         Img=new Image();       //动态生成Image控件
               graph=count.Substring(i,1);
               Img.ImageUrl=graph + ".gif";
               Container.Controls.Add(Img);  //加载到控件容器
            }
    }
    </script>

  • 相关阅读:
    (转) hive调优(2)
    (转)hive调优(1) coding调优
    hive on tez 错误记录
    tez 0.9.0 配置
    hive on tez
    让博客园自动生成目录
    hive --metastore三种模式
    hive 使用beelin连接报错
    mysql my.cnf文件
    1、Kfaka 部署
  • 原文地址:https://www.cnblogs.com/RobotTech/p/537196.html
Copyright © 2011-2022 走看看