PDA

View Full Version : [CLOSED] Strip away FormData from DirectMethod request



henrik.sandberg
Sep 21, 2012, 6:36 PM
Is it possible to strip away all form data on a direcmethod request except the essential for the directmethod i.e. (submitDirectEventConfig)
when calling a non-static directmethod defined in a masterpage?

Maybe by a custom "Ext.net.DirectMethod.request" ?
Or is there a simple option flag to set or override that can be done?

I need the method to be non-static...
because it loads custom control as such ->

var control = Ext.Net.Utilities.ControlUtils.FindControl<Ext.Net.DesktopModuleProxy>(this.LoadControl("Tools/" + name + ".ascx"));

Or can dynamic desktop modules be loaded in a static directmethod method?

Daniil
Sep 21, 2012, 7:43 PM
Hi Henrik,

Wellcome to Ext.NET!

Please use the

type: 'load' // defaults to 'submit'
option.

Example

App.direct.TestDirectMethod({ type : 'load' });

It should behave as you need.

Please note that the __EVENTTARGET and __EVENTARGUMENT parameters will be still in a request since they are required.

geoffrey.mcgill
Sep 22, 2012, 6:18 AM
You can also set the Type in the [DirectMethod] attribute config.

Example


[DirectMethod(Type = DirectEventType.Load)]

Then you don't have to add the extra config object in the JavaScript call.

Hope this helps.

henrik.sandberg
Sep 24, 2012, 7:26 AM
You can also set the Type in the [DirectMethod] attribute config.

Example


[DirectMethod(Type = DirectEventType.Load)]

Then you don't have to add the extra config object in the JavaScript call.

Hope this helps.

YES!
Thanks, works like a charm!