开发者

Filter expression in Sqldatasouce

I have a sqldatasource where i have added a simple filter expression just for testing

<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                SelectCommand="SELECT * FROM [project_details]" 
                FilterExpression="id=33" 
                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                Enabl开发者_高级运维eCaching="True">

and a grid view in update panel which has datasource as sqldatasouce1 . but on executing this page grid view is showing all the result withour any filtering . please help me i am totally struck here


If the id is stored in text format then you might want to give single quotes in the expression as shown here:

id='33'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜