Sep 26, 2014, 1:53 PM
[CLOSED] How to call one procedure (code behinde) from javascript
Hi Support Team,
Need your help and info about how to execute a procedure in code behind from javascript:
in code behind:
Regards,
@joe2014
Need your help and info about how to execute a procedure in code behind from javascript:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="Test.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>test</title>
<script type="text/javascript">
var Confirm = function () {
var title = 'Confirm';
var msg = 'Are you sure?';
Ext.Msg.confirm(title, msg, function (btn) {
if (btn == 'yes') {
deleteselected();
return true;
} else {
return false;
}
});
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<ext:ResourceManager ID="ResourceManager1" runat="server" EnableViewState="True" DisableViewState="False" />
<ext:Button ID="buttonSave" runat="server" Text="Save" Icon="Disk" >
<Listeners>
<Click Handler="return Confirm();" />
</Listeners>
</ext:Button>
</div>
</form>
</body>
</html>
in code behind:
Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Public Sub deleteselected()
Response.Redirect("~/WebForm2.aspx")
End Sub
End Class
Need your help please. thanks.Regards,
@joe2014
Last edited by geoffrey.mcgill; Sep 26, 2014 at 4:17 PM.
Reason: CLOSED