Saving state

Last post 10-31-2003 7:27 AM by Bliek. 3 replies.

Sort Posts:

  • Saving state

    10-30-2003, 2:32 PM
    • Member
      50 point Member
    • Bliek
    • Member since 03-24-2003, 11:34 PM
    • Posts 10
    Hi all,

    I was wondering if there is an easy way to save state of a module after having been to the editpage. I'll try to explain my situation. I have written a PA with two dropdownlists. The first dropdownlist is always visible. Selecting one item shows the second dropdownlist with contents according to the selection. No problem so far. Selecting one item from the second dropdownlist determines the contents of a datagrid that is shown then. So far so good. Now picking the pencil to edit the details of the line shown in the grid, takes us to the editpanel. Now, after returning from the edit panel, my PA is shown again in it's initial state, only the first dropdownlist visible. This is not what I want. I want to show the PA in the state it had when I pressed the pencil. Can this easily be done?

    Regards,
    Bliek
  • Re: Saving state

    10-30-2003, 5:44 PM
    • Contributor
      4,075 point Contributor
    • bertcord
    • Member since 10-24-2002, 2:36 PM
    • Posts 813
    using the current set up you could do the following

    1. Pass the value in the Query String - this is your best bet
    2. Store it in session

    both of these solutions run into issues if you have more than one of the modules on the same page.

    Or

    I have been working on a solution that will dynamically swap module controls based on events. hen the event is raised I pass values just like the querystring..... I will have a sample in a view days when I release my document management control......

    just need to finish the DotNetNuke and Exception management application block first....

    Bert
  • Re: Saving state

    10-30-2003, 6:25 PM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 1:23 PM
    • Posts 2,632
    • TrustedFriends-MVPs
    What I've been doing is leaving the EditModule out all together or only using it for "Module-Wide" Settings, then making an edit panel on the same control.

    When you go to edit mode you just do a post-back to the same TabId & ModuleId and make the edit panel visible at that time (optionally you can hide the details of what is being edited).

    Now state can be saved between posts in the ViewState which is very performant.
    John M.

    DotNetNuke Module for Performance
  • Re: Saving state

    10-31-2003, 3:36 AM
    • Member
      50 point Member
    • Bliek
    • Member since 03-24-2003, 11:34 PM
    • Posts 10
    Thanks, I'll try both of the solutions and see which one fits best for me.

    Bliek
Page 1 of 1 (4 items)