表单页
<form method="post" action="default4.aspx">
<input id="Text1" type="text"/><br />
<input id="Text2" type="text" />
<br />
<input id="Submit1" type="submit" value="提交" />
</form>
处理页
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
<!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>
处理页 .cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Default4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string username = Request["Text1"].ToString();
string password = Request["Text2"].ToString();
// Response.Write("用户名:" + username + ";密码:" + password);
}
}
请问各位大虾,我到底哪里错了!!