前端: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %> <!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> <input id="txt" name="txt" type="text" /> <input id="btn" type="button" value="button" onserverclick="btn_Click" runat="server"/> </div> </form> </body> </html> 后端: protected void btn_Click(object Src, EventArgs E) { string s = Request.Form["txt"]; Response.Write("<script language='javascript'>alert('" + s + "');</script>"); } 得到的效果: 在文本框中输入值: 点击button后: 得到的结论:服务器端表单内的HTML控件的值可以直接用Request.Form["控件名"]来获取。