我怎么样才可以把ViewState["vs_edit_status"] 的值清空?? ViewState["vs_edit_status"] = "1"; 我怎么样才可以把ViewState["vs_edit_status"] 的值清空?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ViewState["vs_edit_status"] = null [C#] void MovePiece(string fromPosition, string toPosition) { StateBag bag = ViewState; object piece = bag[fromPosition]; if (piece != null) { bag.Remove(fromPosition); bag.Add(toPosition, piece); RenderBoard(); } else { throw new InvalidPositionException("There is no game piece at the \"from\" position."); }}所以阿,ViewState.Remove("vs_edit_status")应该是可以的 Ajax 在母版页上添的连接怎么样在内容页中显示? 如何将IIS配置成应用程序 自定义控件读取innerHtml问题 一个类似行列转换的问题 如何使新用户首次登陆后强制修改密码? 摸板显示数据问题 求一正则查找有几个图片并替换为<br> 在线请教——关于web页控件选择的问题 page语句中inheris 如何在关闭子窗口的时候,同时刷新父窗口? 有问题!
void MovePiece(string fromPosition, string toPosition) {
StateBag bag = ViewState;
object piece = bag[fromPosition];
if (piece != null) {
bag.Remove(fromPosition);
bag.Add(toPosition, piece);
RenderBoard();
}
else {
throw new InvalidPositionException("There is no game piece at the \"from\" position.");
}
}
所以阿,ViewState.Remove("vs_edit_status")应该是可以的