Created
July 31, 2013 22:46
-
-
Save Termiux/6126906 to your computer and use it in GitHub Desktop.
This is a simply example of a confirmation box and gridview using jQuery Noty plugin and Asp.Net WebForms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$('#MainContent_InsertButton').click(function (e) { | |
// first we must stop the postback to show this confirmation | |
e.preventDefault(); | |
noty({ | |
text: 'Insert this data to system?', | |
buttons: [ | |
{ addClass: 'btn btn-primary', text: 'Ok', onClick: function ($noty) { | |
// this = button element | |
// $noty = $noty element | |
// now close this notification after click | |
$noty.close(); | |
// do the Insert button postback | |
__doPostBack('ctl00$MainContent$InsertButton', '') | |
//noty({text: 'You clicked "Ok" button', type: 'success'}); | |
} | |
}, | |
{ addClass: 'btn btn-danger', text: 'Cancel', onClick: function ($noty) { | |
// now close this notification after click | |
$noty.close(); | |
//noty({text: 'You clicked "Cancel" button', type: 'error'}); | |
} | |
} | |
] | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment