using System;
using System.Collections.Generic;
using System.Linq; using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Reflection; using ClassLibrary1;
namespace WebApplication1 {
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Type _type = this.GetType();
_type.GetMethod("SetUserInfo").Invoke(this, null);
String _context = _type.GetMethod("GetName").Invoke(this, new Object[] { }) as String;
}
public void SetUserInfo()
{
HttpContext.Current.Session["Name"] = "张三";
}
public String GetName()
{
String _Name = HttpContext.Current.Session["Name"].ToString();
return _Name;
}
}
}
浙公网安备 33010602011771号