我尝试使LinkButton的onCommand函数异步。
<asp:LinkButton ID="..." runat="server" OnCommand="FooCommand" </asp>
protected async void FooCommand(object source, CommandEventArgs e)
{
var result = await somethingAsync();
ClientScript.RegisterStartupScript(...., string.Format("<script...{0}....</script>", msg)
}
在此上下文中使用async void是否可以?我应该在异步调用后使用ConfigureAwait(false)吗?