Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Many thanks.. well i found the answer - id was the problem, in load control method. I was doing this wizard.. well most of things work now. If someone is interested to see how does this works.. there are some updates:</p> <pre><code>public void LoadSplitViewControl(string path) { SwitchNavigationView(NavigationView.SplitView); LastNavigationView = NavigationView.SplitView; LoadControl(SplitControlLoader, path, "LoadedControlSplit"); } public void LoadSingleViewControl(string path) { SwitchNavigationView(NavigationView.SingleView); LastNavigationView = NavigationView.SingleView; LoadControl(SingleControlLoader, path, "LoadedControlSingle"); } public void LoadSingleViewControlAsClear(string path) { SwitchNavigationView(NavigationView.SingleView); LastNavigationView = NavigationView.SingleView; LoadControlAsClear(SingleControlLoader, path, "LoadedControlSingle"); } private void LoadControl(PlaceHolder holder, string path, string ID) { UserControl ctrl = (UserControl)Page.LoadControl(path); ctrl.ID = ID; LastControlPath = path; holder.Controls.Clear(); holder.Controls.Add(ctrl); } </code></pre> <p>//as i am using steps loaded controls using splitview and substeps controls using single view sometimes viewstate will not be valid so error will be thrown but u can resolve this by using LoadSingleViewControlAsClear that will load below method.</p> <pre><code>private void LoadControlAsClear(PlaceHolder holder, string path, string ID) { UserControl ctrl = (UserControl)Page.LoadControl(path); ctrl.ID = ID; LastControlPath = path; ctrl.EnableViewState = false; holder.Controls.Add(ctrl); } </code></pre> <p>/<em>another cool idea i am using for such an wizard is that i am not using viewstate but rather session object for saving values collected over steps. My session object key is generated by authenticated username and pageguid - so u can have many loaded pages and each of them will handle different session object.</em>/</p> <pre><code>public Guid PageGuid { get { if (PageGuidField.Value == "") { var _pageGuid = Guid.NewGuid(); PageGuidField.Value = _pageGuid.ToString(); return _pageGuid; } return new Guid(PageGuidField.Value); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload