ASP.Net form fields are empty only on env clients

I was tasked with solving a problem with some old project that someone wrote.
The ASP.Net project is deployed to IIS.


  • Open the request form.
  • Fill in your personal details.
  • Click the Add Items button to open the Member Selector.
  • Select the members and close the member selectors.

Expected : Returning to the request form, it now displays as the personal data entered in step 2 and now on the same request page a list of the selected items selected in step 4.

Actual : Return to the request form without showing personal details and only showing the selected items.

From the code, I find out that each field in the request form:

  • Saved in session (like onChange in JavaScript call code-behind save function)
  • Loading from Session on Page_Load

I guess the above is needed as a replacement mechanism for the ViewState, because in the above scenario it is necessary for form fields (e.g. personal details) to save multiple pages. (Opening other windows to add items ...)

Also from the code, I learn that the items added to the Add Items windows:

  • Saved in session on the Add Items page
  • Loaded from session to Page_Load of the Request page

Now, instead of working on the project in the clients' offices, we copied the project and deployed it back to our offices - the problem is only now working fine, that is, both the personal data and the list of selected items are displayed as expected.

I would like to have any suggestions ... What could be causing this behavior?
Also, if I cannot recreate the problem in my environment, what should I check / debug in the client's office?


source to share

1 answer

... What could be the reason for this behavior?

Based on your symptoms, it seems like there might be a server-side relying on a client-side script (to set the form values ​​sent from the server response) that have (like jQuery) that might not be supported by the (possibly outdated) browser you're using.

... what should I check / debug at the client's office?

Here's what I'm going to do, should happen after the client opens the form:

  • The user enters values ​​into a form control. ( "Personal data" )
  • The client-side event handler sends asynchronous requests to the server (no callback) to persist the form values ​​for the user's session.
  • The user clicks a button. ("Add Items")
  • The client-side event handler opens a new window that sends a request to the server for the Item Selector page.
  • The response was received from the server, and the Client displays the Select Items page.
  • The user selects values ​​for the controls. ("Selecting Items")
  • User clicks the button ("Close Window")
  • Client side event handler:
    • Sends a request (with Member Selectors) on behalf of the previous window to the server for the Personal Information page.
    • Closes the current window.
  • The previous window receives a response, the page is completely reloaded and all the form data is still present (reloaded).

We know that at least 9. is not actually happening as expected as this is your stated problem.

Assuming I have the correct implementation, you should start by defining how , the values ​​should be written to the controls during the last step (e.g. server control parameter values ​​directly or server registers, client <script to write form values). Then you should check the values ​​sent to the method you discovered. If the values ​​are not correct , save a backup for every previous server request to see what is the result of the session state before the response. If the values ​​are correctthen you know that something goes wrong (most likely client side) after the client receives a response from the server (I think this should only happen if my jQuery theory above is correct).



All Articles