Q:

ASP .NET - How to get the value from a stored procedure via a SQLDataSource

Just starting to learn ASP.NET (C#) and I am using Visual Studio 2008.
I have a stored procedure:
ALTER PROCEDURE dbo.StoredProcedure1    
AS
SET NOCOUNT ON 
SELECT MAX(issue_id) FROM tableb as max_issue_id
RETURN

Which is linked to a sqlDataSource.
How do I retrieve the value from the stored procedure by using the sqlDataSource?  Ideally I would like to assign this value to a variable/textbox/label.

A:

How about something like
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:myConnectionString %>"
        ProviderName="System.Data.SqlClient" 
        SelectCommand="StoredProcedure1" 
        SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="txtOut" Name="cpOut"               PropertyName="Text" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>

