• 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
  • 相关阅读:
    为什么我们从Yarn切换到pnpm
    🔑 最佳密码长度是多少?
    vue + ArcGIS 地图应用系列二:加载地图
    vue + ArcGIS 地图应用系列一:arcgis api本地部署(开发环境)
    玩转 GitHub 的几个小技巧
    在 Array.some 中正确使用 async
    如何正确的在 Array.map 使用 async
    一道关于JavaScript 代码执行顺序的面试题解析
    Git 常用命令及应用这一篇就够了(新手向)
    VUE 子组件向父组件传值 , 并且触发父组件方法(函数)
  • 原文地址:https://www.cnblogs.com/hateyoucode/p/1436490.html
Copyright © 2020-2023  润新知