现在的位置: 首页 > 综合 > 正文

如何在UserControl中调用所在页面的ViewState (转)

2012年11月22日 ⁄ 综合 ⁄ 共 209字 ⁄ 字号 评论关闭

有2种方法:大家可以试试

1。
((Page)System.Web.HttpContext.Current.Handler).ViewState["Whatever"]  

2。
public  void  checkitout(string  param1,System.Web.UI.Page  tmpPage);  
调用checkitout("baby",this)

抱歉!评论已关闭.