zoukankan      html  css  js  c++  java
  • VS.NET(C#)--2.4_aspx默认页面模板代码

    默认模板代码

    客户端浏览器将忽视<script>块间任何字符,不在页面输出。通过<%=DataTime.Now.ToString() %>      将服务端代码放中间

    <% @PageLanguage="C#" AutoEventWireup="true"CodeFile="Default.asp.cs" Inherits="_Default" %>

    注:Language指明编写服务器端代码所使用的语言。一个解决方案可以有多种语言,但是一个页面只允许使用一种语言。

    codeFile指明页面的后台编码文件的文件名(双击页面或右击选择查看代码进入)

    AutoEventWireup向ASP.NET说明如何把事件关联到事件处理方法。若为true,则页面运行时特别命名的事件处理程序Pade_Load()和Page_Init()会被ASP.NET自动调用。否则需要连接事件和其处理程序。

    Inherits表明了后台编码文件定义的命名空间和类名。

      

    <% @PageLanguage="C#" AutoEventWireup="true"CodeFile="Default.asp.cs" Inherits="_Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >

    <head runat="server">    

    <title>无标题页</title>

    </head>

    <body>   

        <form id="form1" runat="server">    

        <div>         

        <h1>

                    ASP.NET Server Controls                          

              </h1>

             <h2>

                    The date and Time is

                    <%=DateTime.Now.ToString() %>

             </h2>

            </div>    

      </form>

    </body>

    </html>

  • 相关阅读:
    Python 常用内置函数
    Java Graphics 2D绘制图片 在Liunx上乱码
    LInux Centos7 重装yum
    Spring Boot 异步调用
    Linux 清除N天前的 日期文件夹(yyyy-MM-dd)
    Python 2.75升级3.6.3
    Linux 移除python Error: Trying to remove “yum”, which is protected
    Java Future 使用场景
    CF446D DZY Loves Games
    三 lambda表达式有什么用
  • 原文地址:https://www.cnblogs.com/ximi07/p/10870920.html
Copyright © 2011-2022 走看看