asp.net mvc - MVC - async Task<PartialViewResult> -


how call child action (render partial) _layout? mvc not support async partial view?

public async task<partialviewresult> _notification() {     var data = new list<usernotification>();     string apinotificationurl = apiprovider.apigenerator("usernotification", new list<string> { "uid" }, true, _usersession.uid);     try     {         //data = await task.run(() => apiprovider.authorize_get<list<usernotification>>(_usersession.token, apinotificationurl));         data = await apiprovider.authorize_get<list<usernotification>>(_usersession.token, apinotificationurl);         if (data == null) new list<usernotification>();     }     catch (exception ex)     {         throw;     }     return partialview(data); } 

view

@html.action("_notification", "home") 


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -