我有一个运行良好的数据源:
<asp:SqlDataSource ID="SqlDataSource4" runat="server"
ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
SelectCommand="SELECT [NonScrumStory].[IncidentNumber], [NonScrumStory].[Description], [NonScrumStory].[CreatedDate], [DailyTaskHours].[Hours], [Application].[AppName], [SupportCatagory].[Catagory] FROM [NonScrumStory], [DailyTaskHours], [Application], [SupportCatagory] WHERE ([NonScrumStory].[UserId] = @userIdSelected) AND ([NonScrumStory].[PK_NonScrumStory] = [DailyTaskHours].[NonScrumStoryId]) AND ([NonScrumStory].[CatagoryId] = [SupportCatagory].[PK_SupportCatagory]) AND ([NonScrumStory].[ApplicationId] = [Application].[PK_Application])">
<SelectParameters>
<asp:QueryStringParameter Name="userIdSelected" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
这是向网格视图显示数据。
当我添加另一个选择参数时:
<SelectParameters>
<asp:QueryStringParameter Name="userIdSelected" Type="String" />
<asp:QueryStringParameter Name="test" Type="String" />
</SelectParameters>
网格视图不再显示任何内容...
我究竟做错了什么?
如果重要,我将在 DeleteCommand 查询语句中使用下一个参数。