Hello,
I'm having a problem but I actually don't know if it is really a problem or if it is normal behavior.
Let's consider this:
I have a form that loads data from DB. I check IsPostBack before loading data soi dont load everything when changing the values on some controls.
When I save (a button click, and a postback) the data is all saved, and that postback didnt pass the load method, so no DB access on that life cycle part.
I guess it is ok, right?
The problem is when:
- Before i'm validating data then i ask the user something. If he confirms, then I send the .ajaxrequest() (client-side method from the AjaxManager I put on the page) and this goes for the Load method of the life cycle, and in the method, the IsPostback is false, so it access the DB.
The strange thing is:
Lets say on the first load (from DB) the name field was "Rob".
I changed it to "Berta" then tried saving
I was asked something then confirmed.
It entered the DB loading and brought me "Rob"
but then when the saving continued (I'm calling it from the ajaxManager serverside event that catches the client ajaxrequest method) it is "Bertha" that I entered.
I don't know if it is normal behavior or if I'm doing wrong for checking the IsPostback property. I'm kinda new to this ajax thing and this is making me a little confused.
Thanks in advance for any help