PDA

View Full Version : [CLOSED] MVC - Direct Method



adelaney
Jun 19, 2012, 6:55 PM
In Ext, what is the equivalent syntax for MVC as when calling a direct method in ASP.NET?


function handleContinue()
{

var markets = #{grdQuoteMarketList}.getRowsValues();
Ext.net.DirectMethods.#{ucMarketList}.ValidateMark etSelection(markets, {
success: function (result) {
if (result) {
generateDocs();
}
},
failure: function(response, options)
{
directEventFailure("Unable to validate market selection", response, 'Validate market selection: ');
}
});

};

Daniil
Jun 19, 2012, 9:43 PM
Hi,

Server side DirectMethods handler are designed to be used in the Web Forms context.

It should not be used in MVC.

In MVC you can use

Ext.net.DirectMethod.request(config);
to call controller actions.

The same way as the Web Service is called here:
http://examples2.ext.net/#/Events/DirectMethods/WebService/