Reputation: 259
Issue Description:
I have an AJAX file-uploader control inside update panel. After successful file-upload, I need to show a bootstrap popup to the user.
Case 1: When I add the update-panel property "updateMode='conditional'", the popup works as expected after successful file-upload. But the control that is kept outside of update-panel doesn't get render after partial-postback. I am using the following code-base to trigger the JavaScript code from code behind:
ScriptManager.RegisterStartupScript(this, this.GetType(), "AddStudent",
"addStudent('1','xyz','10000');",true);
Case 2: But when I remove the "updateMode='conditional'" property, the controls outside the update-panel doesn't disappear after partial postback but the popup DOESN'T work at all i.e. the script doesn't get register in the DOM.
Kindly help.
Upvotes: 0
Views: 549
Reputation: 259
After digging out each & every line of code, finally I got the reason behind the bug.
A "div" tag that was placed inside update-panel was NOT closed as expected. Here is the error & the solution:
Erroneous tag:
<div class="vertical-bar"/>
Solution:
<div class="vertical-bar"></div>
As the above DIV was NOT closed correctly, the DOM was under an impression that all the elements below the div, are inside the div and as a result all the controls was getting rendered inside update-panel.
Hence, in the process of partial-postback the other controls were getting disappeared.
Upvotes: 1