asp.net - Looking for a Pattern for Keeping Page Field Values on Returning to the Page -


I have, e.g. A list page with list inputs, one of which can navigate to the capture page, where they can capture some time before returning to the list page. When they return to the list page, I would like them to automatically re-apply their previous filters.

This is not a rocket science problem, so I'm sure there are already numerous solutions, but I hope to get some answers here that I usually use patterns to solve it Raised as I mean, with a page per page, for the session object for the 'pre-set' page, it can be extended to pre-set for long periods to store a longer duration than the session.

I have some helpful functions in the utility class, where I pass through the controls that save me or load To do this, I usually call the load at the initial page load for the session, and the user will call the saved function when searching or whenever I have to save.

I am making a new surcharge for every kind of control here to save the session here is one for textbox I'm not sure whether this is a very good code, but it works very well is.

  Public Zero Retouchation (Text Box Control, HTP Session Session, String Section) {Session of [Segment. Control .ID] = Control. Text; } Public string LoadFromSession (Text box control, Http session session, String current, String DefaultValue) {string ReturnValue = ""; If (session [section + control.ID]! = Null) {control.Text = session [section of control.ID]. Ostring (); Return value = session [section + control.ID]. Ostring (); } And {control.Text = DefaultValue; Return value = default price; } Return return value; }  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -