I’m working on a large, complex ASP.NET project.
I have a dynamically loaded web user control with an UpdatePanel that doesn’t update correctly. The UpdatePanel is being triggered from a JavaScript function.
I’ve managed to create a very simplified project that demonstrates the issue and have posted it at http://www.softcircuits.com/Client/TestProject.zip.
I would be extremely grateful if someone with a deeper understanding of these technologies could take a look and point me in the right direction.
I think I found what is happening. I know that the UpdatePanel postback is like a normal postback but only a part of the page is sent back to the client. So I played around a bit and found what HalfTrackMindMan mentioned to work as expected. Then I asked google to about common mistakes with UpdatePanels and found this article that explained what is going wrong.
This is what actually happens.
So if you put testing in one of the textboxes and press the button you can see that “testing” value goes to the server and comes back.
So to update the values of input element in an update panel you need to do it in the Pre_render event. On the other hand you can update a label on on_load and it will work.
Hope that helps.