Sep 06, 2013, 6:10 PM
[CLOSED] MessageBox Confirm - Using DirectMethod and CodeBehind
Ext.Net 2.x Question:
Hello - I am trying to ask the user a question using the MessageBox, and depending on his/her answer, I want to take two different paths. So far, according to previous posts, I have written the code listed below. I don't get any syntax or run-time errors. When I run in debug, it runs this code, and continues to the next lines, but nothing happens.
Hello - I am trying to ask the user a question using the MessageBox, and depending on his/her answer, I want to take two different paths. So far, according to previous posts, I have written the code listed below. I don't get any syntax or run-time errors. When I run in debug, it runs this code, and continues to the next lines, but nothing happens.
// Code in the CodeBehind, which calls the DoYes or DoNo functions
ext.X.MessageBox.Confirm("Test", "Are you sure?", new ext.MessageBoxButtonsConfig
{
Yes = new ext.MessageBoxButtonConfig
{
Handler = "Assignments.DoYes()",
Text = "Yes I'm sure"
},
No = new ext.MessageBoxButtonConfig
{
Handler = "Assignments.DoNo()",
Text = "No Thanks"
}
}).Show();
//Beginning of markup:
<script runat="server">
[DirectMethod]
public void DeleteYes()
{
this.ExtHiddenDeleteConfirm.Text = "yes";
}
[DirectMethod]
public void DeleteNo()
{
this.ExtHiddenDeleteConfirm.Text = "yes";
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link rel="stylesheet" href="VAStyle.css" />
</head>
<body>
<form id="frmExtAssignmentsSummary" runat="server">
<ext:ResourceManager
ID="rmExtAssignmentsSummary"
runat="server"
DirectMethodNamespace="Assignments"
>
</ext:ResourceManager>
<%--Hidden Fields - ViewState --%>
<ext:Hidden ID="ExtHidden_AddorModify" runat="server"></ext:Hidden>
<ext:Hidden ID="ExtHidden_ID" runat="server"></ext:Hidden>
<ext:Hidden ID="ExtHidden_Student_People_ID" runat="server"></ext:Hidden>
<ext:Hidden ID="ExtHidden_Teacher_People_ID" runat="server"></ext:Hidden>
<ext:Hidden ID="ExtHidden_sFilterCategory" runat="server"></ext:Hidden>
<ext:Hidden ID="ExtHidden_sFilterStatus" runat="server"></ext:Hidden>
<ext:Hidden ID="ExtHiddenDeleteConfirm" runat="server"></ext:Hidden>
Last edited by Daniil; Sep 17, 2013 at 5:28 AM.
Reason: [CLOSED]