locked
Varying loss of control data on postback RRS feed

  • Question

  • User38879336 posted

    I have a very odd problem, and am hoping someone has seen something like it before.

    Running on iis6  framework 2.0

    1.  Call a stored proc to retrieve some data, which is a slow operation as the query is complicated, so I store the data in a datatable which I place on the viewstate for use on postbacks when saving.   

    2   There's an asp::table control on the page, which has a load of rows and columns dynamically added.  The controls (standard textboxes) are populated from the datatable (not bound!)

    3.  The viewstate is stored in the DB to keep the size of the page down.

    4.  When a save button is pressed, it goes round every textbox on the page and....

    if control value = original value then go on to next control
    if control value is blank then delete original value from db
    else if row exists on db then update value
         else insert new value to the db.

    Which when I run it locally works perfectly well and I can't get it to go wrong.

    However, on the customer system, which I have absolutely no access to, it keeps failing.

    Wha is happening is that from a random  point down the table to the end of the table, loads of textbox fields are being set to blank and so when the control data arrives back at the server, it compares blank with an original value, decides the user has cleared the field and promptly deletes the data from the db.

    Any ideas at all ?    Anything I can look at that might pinpoint the problem ?

    Hoping someone can help

    Thanks for reading

    Adrian Parker.

    Friday, March 22, 2013 2:31 PM

Answers

  • User-166373564 posted

    Hi,

    Which when I run it locally works perfectly well and I can't get it to go wrong.

    However, on the customer system, which I have absolutely no access to, it keeps failing.

    Perhaps there is something wrong with the deployment of your application on IIS,

    Deploy application to a local test environment before deploying to a production environment.  This allows you to thoroughly test in a safe environment before moving the application into production.

    You could follow the steps about deploying applications to a production server below, and check whether it can give some tips for you,

    For reference - Deploying Applications to a Production Server

    hope it helpful for you to troubleshoot,

    With regards

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 1, 2013 2:14 AM