zoukankan      html  css  js  c++  java
  • aspx后台代码写在前段

    合并cs的代码

    <%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
    
    <%@ Import Namespace="System" %>
    <%@ Import Namespace="System.Collections.Generic" %>
    <%@ Import Namespace="System.Linq" %>
    <%@ Import Namespace="System.Web" %>
    <%@ Import Namespace="System.Web.UI" %>
    <%@ Import Namespace="System.Web.UI.WebControls" %>
    <%@ Import Namespace="WcfService1" %>
    <!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>
            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        </div>
        </form>
    </body>
    </html>
    <script runat="server">
        protected void Button1_Click(object sender, EventArgs e)
        {
            string message = "aaaabbb";
            Class1 cl = new Class1();
            message = cl.GetData(1111);
            Label1.Text = message;
    
        }
    </script>

    参考文章:

    http://www.cnblogs.com/studyzy/archive/2007/07/25/830856.html

  • 相关阅读:
    map-count
    map-count
    map-constructors
    map-constructors
    multiset-find
    multiset-find
    multiset-insert
    C++ string详解
    treap(树堆)
    程序设计语言的变革
  • 原文地址:https://www.cnblogs.com/sshoub/p/3258750.html
Copyright © 2011-2022 走看看