public static void PutQueryToState(RQquery query, UserState.States stateType) { state = (ViewState)UserState.Get(stateType); if (state == null) { state = new ViewState(stateType); } state.query = query; state.Save(); }
public static Boolean GetClasstreeOptionsState() { state = (ViewState)UserState.Get(UserState.States.ClasstreeOptionsState); if (state == null) { state = new ViewState(UserState.States.ClasstreeOptionsState); state.query = false; state.Save(); } return((Boolean)state.query); }
protected override void SavePageStateToPersistenceMedium(object viewState) { CiroLightLibrary.BLL.ViewState myViewState = new ViewState(); if (Request["__DATABASE_VIEWSTATE"] != null) { myViewState.GUID = Request["__DATABASE_VIEWSTATE"].ToString(); } else { myViewState.GUID = Guid.NewGuid().ToString(); } LosFormatter myFormatter = new LosFormatter(); StringWriter myStringWriter = new StringWriter(); myFormatter.Serialize(myStringWriter, viewState); myViewState.Value = myStringWriter.ToString(); myViewState.Save(); ScriptManager.RegisterHiddenField(this, "__DATABASE_VIEWSTATE", myViewState.GUID); }
public static Boolean GetClasstreeOptionsState() { state = (ViewState)UserState.Get(UserState.States.ClasstreeOptionsState); if (state == null) { state = new ViewState(UserState.States.ClasstreeOptionsState); state.query = false; state.Save(); } return (Boolean)state.query; }