小弟初学ASP.NET,对一些基本概念不是很理解,在此请教各位高手,请赐教!例如在下面的WEB页间传递值的例子中,public class secondpage : System.Web.UI.Page
{
    protected System.Web.UI.WebControls.Label Label1;    public firstpage fp;

    private void Page_Load(object sender, System.EventArgs e)
    {
if(!IsPostBack)
{
   fp = (firstpage)Context.Handler;
}
this.Label1.Text = fp.FirstName + fp.LastName + "传递值成功!";
    }

解决方案 »

  1.   

    Page类都是所谓的HttpHandler,HttpContext是ASP.NET给你的每个请求产生的一个相当于环境变量的玩意,你请求的页面的对象就被赋值给HttpContext.Handler属性,当你用Server.Transfer转移到第二个页面时,HttpContext.Handler保持不变,还是第一个页面对象找本书或文章读读吧,譬如The ASP.NET Page Object Model
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-pageobjectmodel.asp
      

  2.   

    同上,是Transfer页面的一个句柄,用于引用那个页面的对象