BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
[aspx]
<ej:SplitButton ID="SplitButton" runat="server" Size="Large" ShowRoundedCorner="true" Text="Save" ClientSideOnItemSelected="onItemClick">
<Items>
<ej:SplitItem Text="Open"></ej:SplitItem>
<ej:SplitItem Text="Save"></ej:SplitItem>
<ej:SplitItem Text="Delete"></ej:SplitItem>
</Items>
</ej:SplitButton>
[script]
function onItemClick(args) {
if ((args.text == "Delete" && !confirm('You really want to delete?')) || args.text != "Delete") {//prompt the USER
$.ajax({
contentType: "application/json; charset=utf-8",
type: "POST",
url: "ButtonFeatures.aspx/Page1",
dataType: "json",
data: {},
success: function (xhr) {
alert(xhr.d) // Ajax success
},
error: function (xhr) {
alert("Error"); // error alert if something went wrong
}
});
}
// ajax post not occurs when Delete prompt is confirmed
}
[aspx.cs]
[System.Web.Services.WebMethod]
public static string page1()
{
return "Hello " + Environment.NewLine + "The Current Time is: "
+ DateTime.Now.ToString();
} |