}
}
#endregion
}
隼朔?厘断栖心心岻念議Login陣周?和中頁頼屁議旗鷹?音揖議仇圭厘喘廣瞥鯉蝕阻?寄社枠膝狛?旗鷹厘断和中氏讐盾議。
public class MyLogin : WebControl
{
//---------------------------------------------------
public Person personInfo;
public Person PersonInfo
{
get
{
if (personInfo == null)
personInfo = new Person();
((IStateManager) personInfo).TrackViewState();
}
set
{
personInfo = value;
}
}
//--------------------------------------------
protected override object SaveViewState()
{
object[] states = new object[2];
states[0] = base.SaveViewState();
states[1] = ((IStateManager) PersonInfo).SaveViewState();
}
protected override void LoadViewState(object savedState)
{
object[] states = (object[])savedState;
base.LoadViewState(states[0]);
((IStateManager)PersonInfo).SaveViewState (states[1]);
}
protected override void TrackViewState()
{
base.TrackViewState();
((IStateManager)PersonInfo).TrackViewState ();
}
才岻念議?揖議何蛍#region 才岻念議?揖議何蛍
奉來#region 奉來
public string UserName
{
get
{
return ViewState["UserName"] != null ? (string)ViewState["UserName"] : "UserName";
}
|