HI,
I’m working on DotNetNuke 5 module that basically consists of three pages; step 1, step2 and step3.
On Step 1 I’m showing a GridView with a CheckBox column and button that should navigate the user to Step 2.
In Step 2, I’m showing a GridView as well that shows the items that have been selected in Step 1.
My questions are:
-
What is the best way to pass my selection from Step 1 to Step 2?
ViewState? Url-parameters?I tried in Step 1: ViewState[“SelectedItems”] = string.Join(“,”, list.ToArray());
IN step 2: I did:var items = (string)ViewState["SelectedItems"];
And I found out items contains empty string. Is ViewState supported by DNN5?
- The built-in ASP.Net wizard control doesn’t offer enough flexibility for customizing it’s look-and-feel and therefore it’s not being used. Does DotNetNuke perhaps offers an alternative for ASP.NET WizardControl?
Thanks!
ViewStateis definitely supported in DNN. However, if you’ve actually setup different pages for each step,ViewStateisn’t going to be available (it only persists across postbacks).If you’d prefer to keep a three page scheme, using URL parameters if probably the easiest. If that’s not palatable, then you’d have to store the info in either a cookie, in the database, or in the
Session.If you want to combine your steps into one control and use postbacks instead of redirection, then you can use
ViewState. I don’t think DNN exposes its wizard framework controls, but you can use aMultiViewcontrol or something similar to switch between the different steps more manually.