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();" 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",
succes ...
Go to the complete details ...