S
Samy
Hi,
I have an sqldatasource declaratively declared in a user control. I
would like to access the dataretrieved by it in the code when it is
bound for the first time. I am trying to do that in the onselected
event of the sqldatasource, but for some reason it seems to hit the
database whenever i call the select method in the selectedeventhandler
like this..
public void SaveIds(object sender, SqlDataSourceStatusEventArgs e)
{
SqlDataSourceView IdSourceView = (SqlDataSourceView)sender;
DataView IdsView =
(DataView)IdSourceView.Select(DataSourceSelectArguments.Empty);
When I try to iterate the IdsView..execution never goes to the next
line after the above statement..
Above two statements are called repetitively oneafter the other for
some reason. If I trace the calls using profiler, the stored proc seems
to be called everytime the above select statement is called..
All I want is to select some ids from the first call which I am unable
to accomplish. Can anybody please let me know why this has been
happening? Do I need to enablecaching to use the onselected event? I
already have the datasourcemode set to dataset.
Thanks.
I have an sqldatasource declaratively declared in a user control. I
would like to access the dataretrieved by it in the code when it is
bound for the first time. I am trying to do that in the onselected
event of the sqldatasource, but for some reason it seems to hit the
database whenever i call the select method in the selectedeventhandler
like this..
public void SaveIds(object sender, SqlDataSourceStatusEventArgs e)
{
SqlDataSourceView IdSourceView = (SqlDataSourceView)sender;
DataView IdsView =
(DataView)IdSourceView.Select(DataSourceSelectArguments.Empty);
When I try to iterate the IdsView..execution never goes to the next
line after the above statement..
Above two statements are called repetitively oneafter the other for
some reason. If I trace the calls using profiler, the stored proc seems
to be called everytime the above select statement is called..
All I want is to select some ids from the first call which I am unable
to accomplish. Can anybody please let me know why this has been
happening? Do I need to enablecaching to use the onselected event? I
already have the datasourcemode set to dataset.
Thanks.