zoukankan      html  css  js  c++  java
  • asp.net 中将表单提交到另一页 CodeBehind(代码和html在不同的页面)

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="FirstPageClass" %>

    <!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:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:TextBox ID="TextBox2"
                runat="server"></asp:TextBox>
            <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
        </div>
        </form>
    </body>
    </html>

    Code

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
    <%@ Reference Page="Default.aspx" %>

    <!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>
       
        </div>
        </form>
    </body>
    </html>

    Code
  • 相关阅读:
    Cookie
    C#计算程序的运行时间
    .Net源码之Page类
    AJAX资源
    匿名方法的使用
    序列化和反序列化
    实验分析C#中三种计时器使用异同点
    (转载)突然就看懂了《大话西游》
    做人、做事,做架构师——架构师能力模型解析
    服务颗粒度的困扰(转)
  • 原文地址:https://www.cnblogs.com/hateyoucode/p/1436490.html
Copyright © 2011-2022 走看看