SqlDataSource OnSelected Event Not Firing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using a stored procedure as the select command for an SqlDataSource tied
to a GridView.

I've verified the sp returns rows in the Management Studio as well as in
VS2005 when I Configure the SqlDataSource and click the Test Query button.

However, when I run the website in VS2005, the GridView is empty, and when I
put a breakpoint in the SqlDataSource_OnSelected event handler, it never
breaks. The the SqlDataSource_OnSelecting event handler breaks when I put a
breakpoint in that event handler.

If I set the SqlDataSource SelectCommand to a valid SQL SELECT statement,
instead of calling the stored procedure, both breaks occur - one in the
OnSelecting event handler and one in the OnSelected event handler.

How can I use SQL Server 2005 stored procedures in SqlDataSource controls so
that they work?
 
Back
Top