The simplest solution to this problem would be: -
- don't use jQuery to show
edit-div
- make
edit-div
a server control - convert your
<a href="#" id="edit-link">edit</a>
to an<asp:LinkButton>
control, and in its server-side click event, show your edit div
The problem is that the UpdatePanel is restoring the original state as per the markup for the page; edit-div
is not a server control and you are showing it via client script, the UpdatePanel is unaware of this and will always return you the original markup.
There are ways to get jQuery to play nice with UpdatePanels in these scenarios, but it is more involved than the simple solution above.
Hope that helps.