Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Update panel is locking the page.

$
0
0

Hi

       I have a wem method defined in my codoe behind. 

Pupose : On an Image button click , call code behind web method(that updates your tables) asynchronously(in background).

So far I have 

<asp:ImageButton ID="imgBtn" CausesValidation="False" runat="server" 
ImageUrl = "~/Images/Img.gif" OnClientClick="updateDb(); return false;" Visible ="False"></asp:ImageButton>

<script src="scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
<script type="text/javascript">

function updateDb() {
$.ajax({
type: "POST", 
url: "MyPage.aspx/updateDbItems",   // Here i call my code behind method that updates the tables
contentType: "application/json; charset=utf-8",
data: "{}",
dataType: "json",
success: function (data) { 
},
error: function (result) {
// alert('Unable to load data: ' + result.responseText);
}
});
}

</script>

My entire page is in an update panel.

When i click on apply to all button , the loading notation of updateprogress is not showing but the page remains locked until the db is updated and the background process finishes.

I want this update to take place in background without locking the current page execution.

Please suggest how can i achieve it.

Thanking you in advance.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>