Getting an Exception while calling some async methods from outside the class

前端 未结 1 908
孤城傲影
孤城傲影 2021-01-29 12:54

lets say i have class called x and y like this

class x
{
    public x()
    {
         p();
    }
    private async p()
    {
      await q();
    }
    priva         


        
1条回答
  •  借酒劲吻你
    2021-01-29 13:16

    I found the solution (that is i followed the instruction the @Richard gave )

    and added Async="true" to my aspx page in side the Page tag(the one that looks like this <%@ Page %> )

    and it worked !

    0 讨论(0)
提交回复
热议问题