Here's another example which might help with your scenario.
This sample demonstrates cancelling the transaction, and responding with a custom ErrorMessage. The ErrorMessage is then passed into a custom JavaScript function which renders an message to the user.
Example
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Button1_Click(object sender, DirectEventArgs e)
{
e.Success = false;
e.ErrorMessage = "Transaction Error<br />" + DateTime.Now.ToLongTimeString();
}
</script>
<!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>Ext.Net Example</title>
<script type="text/javascript">
var doSomething = function (result) {
Ext.Msg.notify("Message", result.errorMessage);
};
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Button runat="server" Text="Submit">
<DirectEvents>
<Click OnEvent="Button1_Click" Failure="doSomething(result);" />
</DirectEvents>
</ext:Button>
</form>
</body>
</html>
Hope this helps.