<form runat=server/>
再试一下

解决方案 »

  1.   

    程序如下:
    webform1.aspx:<%@ Page language="c#" Codebehind="findpwd.aspx.cs" AutoEventWireup="false" Inherits="myproject.findpwd" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
    <meta content="C#" name="CODE_LANGUAGE">
    <meta content="JavaScript (ECMAScript)" name="vs_defaultClientScript">
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    <LINK href="/style.css" rel="stylesheet">
    </HEAD>
    <body MS_POSITIONING="GridLayout">
    <form id="findpwd" action="webform2.aspx" method="post" runat="server">
    <asp:textbox id="uname" runat="server"></asp:textbox>
    <asp:Button Text="提交" Runat="server" id="Button1"></asp:Button>
    </form>
    按'提交'按钮后,并没有提交到webform2.aspx页.
      

  2.   

    Codebehind="findpwd.aspx.cs
    按F7编辑findpwd.aspx.cs文件即可
      

  3.   

    我的webform1.aspx代码如下:
    <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="MyForm.WebForm1" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>

    </HEAD>
    <body MS_POSITIONING="GridLayout">
    <form id="form1" method="post" action="WebForm2.aspx" runat="server">
    <asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 399px; POSITION: absolute; TOP: 160px" runat="server"></asp:TextBox>
    <asp:Button id="Button1" type="submit" style="Z-INDEX: 102; LEFT: 451px; POSITION: absolute; TOP: 267px" runat="server" Text="Button"></asp:Button>
    </form>
    </body>
    </HTML>
    而得到的html代码是:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>

    </HEAD>
    <body MS_POSITIONING="GridLayout">
    <form name="form1" method="post" action="WebForm1.aspx" id="form1">
    <input type="hidden" name="__VIEWSTATE" value="dDwxNDg5OTk5MzM7Oz4=" /> <input name="TextBox1" type="text" id="TextBox1" style="Z-INDEX: 101; LEFT: 399px; POSITION: absolute; TOP: 160px" />
    <input type="submit" name="Button1" value="Button" id="Button1" type="submit" style="Z-INDEX: 102; LEFT: 451px; POSITION: absolute; TOP: 267px" />
    </form>
    </body>
    </HTML>
      

  4.   

    是不会提交,因为你设了Codebehind=findpwd.aspx.cs,这是asp.net的代码分离技术,你得编辑这个文件才成,如果是在vs.net中,双击Button1,写上你的代码即可
      

  5.   

    please you study the "Codebehind" .
    if you acknowledge of it ,you will know to do it!