不知道被什么闪了一下腰!
弄不明白了,这么简单的代码,居然行不通!
protected void Page_Load(object sender, EventArgs e)
{
string aa = "";
try
{
aa = Request.QueryString["Item"];
}
catch (Exception)
{
}
//如果下面这行不要的话,就没有问题
TextBox1.Text = aa;
}
protected void Button1_Click(object sender, EventArgs e)
{
string url;
url = "Default2.aspx?Item=" + TextBox1.Text.ToString().ToUpper();
//为什么这里取到的TextBox1.Text总是空的?
Response.Redirect(url);
}
protected void Page_Load(object sender, EventArgs e)
{
string aa = "";
try
{
aa = Request.QueryString["Item"];
}
catch (Exception)
{
}
//如果下面这行不要的话,就没有问题
TextBox1.Text = aa;
}
protected void Button1_Click(object sender, EventArgs e)
{
string url;
url = "Default2.aspx?Item=" + TextBox1.Text.ToString().ToUpper();
//为什么这里取到的TextBox1.Text总是空的?
Response.Redirect(url);
}