添加where 字段=对应session

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:LabelEasyConnectionString2 %>"
            SelectCommand="SELECT [MOrderType], [MSessionID], [MMemberID] FROM [OrderView] WHERE ([MMemberID] = @MMemberID)">
            <SelectParameters>
                <asp:SessionParameter Name="MMemberID" SessionField="MemberID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>

你可能感兴趣的:(session)