Your code is essentially single threaded. You've got 2 threads, but one is completely blocked waiting on the other. In any case, putting the LoadData code on a background thread, since it's the only thing you're doing, is no different than if you completely skipped all the Task/async/await stuff. You're not getting any performance benefit by threading this.
But, to simply things a bit, you can try it this way:
protected async void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack())
{
var result = await LoadDataAsync();
GridView1.DataSource = result;
GridView1.DataBind();
}
}
protected Task<list<user>> LoadDataAsync()
{
return Task.Factory.StartNew<list<user>>(() =>
{
using (var context = new BlogEntities())
{
users = context.Users.SqlQuery("SELECT * FROM [User]").ToList();
}
}
}