c# - Using Custom IHttpModule to save information on changing pages -
I have a site where users can access a particular page to access many information if the user Navigating away from that page, I would like to store a session variable so that the user can return to that page and add all the information first.
I have created a custom IHttpModule. My intent was to use this thing to focus on reaching users away from the page, then reach the page, grab the variable from it, and re-populate the population. Submit later for.
Here's what I found:
Public Zero Innte (HTTP Application Application) {Application.BeginRequest + = (New EventHandler (this.Application_MovePages)); } Private Zero Application_MovePages (Object Source, EventArgs E) {HttpApplication Application = (HttpApplication) Source; HttpContext Reference = Application. Concept; System.Web.Ui Page; If (HttpContext.Current.Handler! = Null) {page = (System.Web.Ui.Page) HttpContext.Current.Handler; }} The problem HttpContext.Current.Handler is always empty. I'm missing something here.
First of all, you need to make sure that the information of the user is saved continuously (as Google Docs In order to do this, you have to send an AJAX request in order to sort the form and save it in order to do this. When the user is navigated, you should inform them that the doctor has not been saved. If they choose to save it, serialize the form with jQuery and send it to a page to save it. In response to that page there is a cookie session value (GUID) that you will later use to view this information. I will do this on SSL as this token can be snugged on the wire.
You do not need an HDM module for this, whatever you can do on your page, which sits at the top of your application can do this for any page. You still have a problem that this is a very specific page. You have to develop 'Save' regularly to work through AJAX, serial information about the form, save it and create load mechanism.
Then ... keep in mind that when you are saving this information a user decides to leave the page, there is something you want to determine how you want to manage.
Comments
Post a Comment