刚才那个问题.再给30分.急
private string _code;
public string CheckCode
{
get
{
try
{
_code = Session[ "checkcode "].ToString();
return _code;
}
catch
{
return " ";
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(_code);//什么也没有
Response.Write(session[ "checkcode "].Tostring());//输出正确
}
------解决方案--------------------protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(this.CheckCode);//什么也没有
Response.Write(session[ "checkcode "].Tostring());//输出正确
}