AnFil
Nov 01, 2020, 5:48 PM
Hello again,
sorry for persisting on the subject.
In our current Ext.Net 3 architecture we rely heavily on calling Direct Methods from client JS functions.
I appreciate the Direct Event example provided above, but what interest us is what is the equivalent of adding a [Direct Method] attribute to a function in order to make it accessible in the App.Direct client side namespace?
We basically use Web Forms in its most basic format, executing ASP.NET code only in the Page_Load method. Everything else happens in [Direct Method] functions. So, essentially, we do not use [Direct Events] which require binding to specific DOM Components.
In a similar approach, can we have code execute server side without having to use a Direct Event but rather call a Direct Method as per below?
Client Side:
function do_register() {
App.direct.Register(
{
success: function (result) {
if (result) {
close_register();
}
},
eventMask: { showMask: true, msg: App.WAIT },
failure: function (errorMsg) { Ext.Msg.alert(App.PROBLEM, errorMsg); }
});
}
Server side:
[DirectMethod]
public bool Register()
{
//some code
return false;
}
Thank you very much for your time.
Kind regards.
sorry for persisting on the subject.
In our current Ext.Net 3 architecture we rely heavily on calling Direct Methods from client JS functions.
I appreciate the Direct Event example provided above, but what interest us is what is the equivalent of adding a [Direct Method] attribute to a function in order to make it accessible in the App.Direct client side namespace?
We basically use Web Forms in its most basic format, executing ASP.NET code only in the Page_Load method. Everything else happens in [Direct Method] functions. So, essentially, we do not use [Direct Events] which require binding to specific DOM Components.
In a similar approach, can we have code execute server side without having to use a Direct Event but rather call a Direct Method as per below?
Client Side:
function do_register() {
App.direct.Register(
{
success: function (result) {
if (result) {
close_register();
}
},
eventMask: { showMask: true, msg: App.WAIT },
failure: function (errorMsg) { Ext.Msg.alert(App.PROBLEM, errorMsg); }
});
}
Server side:
[DirectMethod]
public bool Register()
{
//some code
return false;
}
Thank you very much for your time.
Kind regards.