当文本框为空时,我希望数据网格不显示任何记录。现在,当文本框为空时,它会显示所有记录。<asp:SqlDataSource ID="dsGridview" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionStringgender, age FROM users"
我有一个ASP.net搜索页面,用户可以在其中输入一个或多个搜索条件。该页调用存储过程来查询MS SQL Server 2008 db。 @Date1和@ date 2都为空(用户不搜索日期)@Date1不为空,@date 2为空(用户在单个日期上搜索)@Date1不为空,@Date2不为空(用户正在搜索日期范围)
我需要创建一个asp.net验证器控件,它只允许在隐藏字段不为空且不只包含逗号的情况下发布页面。<asp:HiddenField ID="hdnProductListTip" ClientIDMode="Static" runat="server" />
<asp:RegularExpressionValidatorYou must have at least one product selected against