I have used partial views in many places, usually nested within a tab control, but also in some places nested inside a for EditorTemplate.
This was done using following type of code :
Html.Partial("_PartialViewName", Model)
Visual Studio was warning of :
MVC1000 : Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync.
So I went through and changed code where I could to :
awaits Html.PartialAsync("_PartialViewName", Model)
This works fine where the partial was within a tab control, or direct on the view but not when it's within an EditorTemplate on a form. Trying the same code gives this error :
The 'await' operator can only be used within an async lambda expression. Consider marking this lambda expression with the 'async' modifier.
I have tried a few things but nothing that VS will accept. Can it be done?
Thanks