Ext.Net.MVC 3.1: Async/Await direct methods.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Ext.Net.MVC 3.1: Async/Await direct methods.

    Hello,

    I try to use async/await in DirectMethods, but I get "App.direct.Method is undefined" error.

    code
        [DirectController]
        public class MyController : Controller
        {
            [DirectMethod(Timeout = 300000, ShowMask = true, Target = MaskTarget.Page)]
            public async Task<ActionResult> Method(string data)
            {
                string text = await Task<string>.Factory.StartNew(() => { return data; });
    
                return Json(new { text = text });
            }
        }
    I saw this link http://forums.ext.net/showthread.php...th-async-await
    but I couldn't find RegisterAsyncTask method in controller.

    Is there some ways to use async/await with DirectMethods?
    Last edited by Yury; May 25, 2015 at 9:11 AM.

Similar Threads

  1. Replies: 3
    Last Post: Apr 01, 2015, 7:36 PM
  2. Direct Methods and Custom Control
    By Zdenek in forum 1.x Help
    Replies: 0
    Last Post: Apr 19, 2012, 10:18 PM
  3. [CLOSED] Async with direct Event
    By imaa in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 09, 2011, 9:46 PM
  4. Are direct methods same as WebMethod
    By deeptechtons in forum 1.x Help
    Replies: 2
    Last Post: Dec 27, 2010, 3:31 AM

Posting Permissions