private void Page_Init(object sender, System.EventArgs e) { Log.Log.WriteToLog("FrameForm2.Page_Init() (IsPostBack=\"" + IsPostBack.ToString() + "\")", true); if ((TestDSVariable = (TestDS)Session["TestDS"]) == null) { TestDSVariable = new TestDS(); Session.Add("TestDS", TestDSVariable); } }
private void Page_Init(object sender, System.EventArgs e) { Log.Log.WriteToLog("MainForm.Page_Init() (IsPostBack=\"" + IsPostBack.ToString() + "\")", true); if ((TestDSVariable = (TestDS)Session["TestDS"]) == null) { TestDSVariable = new TestDS(); Session.Add("TestDS", TestDSVariable); } #if !IFRAME_ENABLED_VIEW_STATE if (!IsPostBack) { if (IFrame1.EnableViewState) { IFrame1.EnableViewState = false; } if (IFrame2.EnableViewState) { IFrame2.EnableViewState = false; } } #endif #if MAKE_IFRAME_SRC_IN_INIT string URLFrame1AddStr = string.Empty, URLFrame2AddStr = string.Empty; if (IsPostBack) { URLFrame1AddStr = URLFrame2AddStr = "IsPostBack=true"; } IFrame1.Attributes["src"] = "FrameForm1.aspx" + (URLFrame1AddStr != string.Empty ? "?" : string.Empty) + URLFrame1AddStr; IFrame2.Attributes["src"] = "FrameForm2.aspx" + (URLFrame2AddStr != string.Empty ? "?" : string.Empty) + URLFrame2AddStr; #endif }