因此,根据在单选按钮列表中选择的内容,我希望为我的数据源更改select命令。我面临的问题是,如果我设置了缺省的selected单选按钮,那么查询就会起作用
我的单选按钮列表、用户列表(dropdownlist都位于更新面板中,该面板在单击按钮后不会更新
这是我的按钮代码
If user.Text = "ALL" Then
SqlDataSource22.SelectCommand = "SELECT * FROM [dashboardtasks] WHERE [completed] = 'NO'"
我有一个网格视图,在这里我正在绑定下面的数据,其中@cols给出了表中显示的动态日期。
但是,如何将该列绑定到网格视图,因为我们必须在项目模板中提供列名?
WITH cte (startdate)
AS
(SELECT
@startdate AS startdate
UNION ALL
SELECT
DATEADD(DD, 1, startdate) AS startdate
FROM cte
WHERE startdate < @enddate
)
select c.startdate
into #tempDates
from cte