As in the title I need to use stored proc to feed LinqDataSource to populate result in GridView. I got this concept to work in SqlDataSource but then I had Authentication issues (I'm running the app on tablets that can't provide Integrated Authentication that SQL Server requires - and I do not want to change SQL configuration). Linq works perfectly for me except when I try to use Calendar control to feed WHERE parameter. The stored proc worked much better and I could receive correct sets but now I have problems populating that to GridView.
Here is the code:
protected void myLinqDataSource_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
DataContext myContext = new DataContext();
e.Result = myContext.myTable(myCalendar.SelectedDate);
}
protected void myCalendar_SelectionChanged(object sender, EventArgs e)
{
myLinqDataSource.DataBind();
myGridView.DataBind();
}
In this configuration the pool times out. If I move binding to event handler, there would be nothing supplied to grid view. Maybe you know a better way to use stored procs with LinqDataSources?