大家快救救我啊 我实在受不了了 我初吻都能送给你们 救命啊
我都感觉简单的不行 但是就不是行 谁能告诉我啊
下面是个WebForm2.aspx 我想提交表单 然后转到WebForm1.aspx 然后吧密码帐号输出 看下面
<%@ Page language="c#" Codebehind="WebForm2.aspx.cs" AutoEventWireup="false" Inherits="Request_Response.WebForm2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm2</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" action="WebForm1.aspx" runat="server">
<input type="text" name="txtUserName" maxlength="25">
<br>
<input type="text" name="txtUserPwd" maxlength="25">
<br>
<input type="button" name="button" value="Submit"> <FONT face="宋体"></FONT>
</form>
</body>
</HTML>
然后WebForm1.aspx.cs的代码是这样的
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Request_Response
{
/// <summary>
/// WebForm1 的摘要说明。
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
string userName=Request.Form.Get("txtUserName").ToString();
string userPwd=Request.Form.Get("txtUserPwd").ToString();
Response.Write("登陆的用户名为"+userName+";密码为"+userPwd);
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
怎么就是跳转不过来呢?按的Submit 但是WebForm2.aspx就是没反映 啥都不动 我要疯了 !!快救命吧!