大家好,我是ASP的初学者,现有个问题不知道怎么解决,希望大家能帮帮我,谢谢!
如下代码,启动调试后报错:嵌入的语句不能是声名或标记的语句(已用红色标出)
public class 欢迎界面 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.TextBox txtNo;
protected System.Web.UI.WebControls.TextBox txtName;
protected System.Web.UI.WebControls.TextBox txtTell;
protected System.Web.UI.WebControls.Label Label3;

private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面

Response.Write("<B>您输入的信息如下: </B>");
                        Response.Write("<BR>");
Response.Write("<BR>");
Response.Write("<B>学号: </B>");
Response.Write(Request.QueryString["No"].Trim());
Response.Write("<BR>");
Response.Write("<B>姓名: </B>");
Response.Write(Request.QueryString["Name"].Trim());
Response.Write("<BR>");
Response.Write("<B>Tell: </B>");
Response.Write(Request.QueryString["Tell"].Trim());
Response.Write("<BR>");
} #region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{    
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load); }
#endregion private void TextBox1_TextChanged(object sender, System.EventArgs e)
{

} private void Button1_Click(object sender, System.EventArgs e)
{
if(!this.IsPostBack)
                   SqlConnection conn=new SqlConnection("Server=(local);Database=wxm;Uid=;Pwd=;");
 try
         {
 conn.Open();
 }
catch(SqlException e)
{
Response.Write(e.Message.ToString());
}
finally
{
conn.Close();
} string No,Name,Tell;
No=txtNo.Text.Trim();
Name=txtName.Text.Trim();
Tell=txtTell.Text.Trim();
Response.Redirect("欢迎界面.aspx?No="+No+"&Name="+Name+"&Tell="+Tell);
         }
}
}