views:

435

answers:

1

Hi,

Here is my markup in my .aspx page, the sqldatasource is feeding my gridview:

 <asp:SqlDataSource ID="sds" runat="server" ConnectionString="server=blah;database=MyPortal;Integrated Security=FALSE;user=sa;pwd=123;"
        SelectCommand="GetUsers" >
        <SelectParameters>
            <asp:QueryStringParameter Name="PageIndex" QueryStringField="PageIndex" DefaultValue="0" />
            <asp:Parameter Name="numberOfRows" DefaultValue="10" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>

Procedure or function 'GetUsers' expects parameter '@pageIndex', which was not supplied.

Why isn't it picking up the Parameter tag for PageIndex?

A: 

You did not supply a type for your pageIndex parameter. Also, while sql server doesn't usually care about upper and lower case in parameter names, I'd also suggest that if you used @pageIndex in the stored procedure, you should use pageIndex for the datasource parameter, rather than PageIndex.

SirDemon
so I added a type and direction, still same error.
Blankman
Well, I tried basically the same code with a dummy stored procedure and it works fine. I'm stumped :( . Let's wait for one of the great gurus here.
SirDemon