SqlDataSource OnSelected Event Not Firing

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top