如何输入在asp.net SQL数据源文本“<”和‘>’

问题描述 投票:-1回答:1

我不能把这个sqlcommandSqlDataSource

<asp:SqlDataSource ID="dsOperator" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>"
        SelectCommand=" select '+' id,'+' txt from dual  
                        union all select '-','-' from dual
                         union all select '*','*' from dual
                         union all select '/','/' from dual
                         union all select '>','>' from dual
                         union all select '<','<' from dual
                         union all select '%','%' from dual
                         union all select '||','||' from dual
                         union all select '=','=' from dual
                         union all select '!=','!=' from dual
                         union all select '>=','>=' from dual
                         union all select '<=','<=' from dual
                         union all select 'LIKE','IS NULL' from dual
                         union all select 'BETWEEN','BETWEEN' from dual
                         union all select 'IN','IN' from dual
                         union all select 'NOT','NOT' from dual
                         union all select 'NOT IN','NOT IN' from dual
                         union all select 'AND','AND' from dual
                         union all select 'OR','OR' from dual
                         union all select 'ANY SOME','ANY SOME' from dual
                         union all select 'ALL','ALL' from dual
                        union all select 'EXISTS','EXISTS' from dual
                        union all select 'ESCAPE','ESCAPE' from dual
                        union all select 'UNION','UNION' from dual
                        union all select 'UNION ALL','UNION ALL' from dual
                        union all select 'INTERSECT','INTERSECT' from dual
                        union all select 'MINUS','MINUS' from dual " ProviderName="<%$ ConnectionStrings:DefaultConnection.ProviderName %>"></asp:SqlDataSource>             

这是我的错误。

enter image description here

asp.net oracle
1个回答
0
投票

我可以通过输入&gt;&lt;编辑

asp:SqlDataSource ID="dsOperator" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>"
        SelectCommand=" select '+' id,'+' txt from dual  
                        union all select '-','-' from dual
                         union all select '*','*' from dual
                         union all select '/','/' from dual
                         union all select '&gt;','&gt;' from dual
                         union all select '&lt;','&lt;' from dual
                         union all select '%','%' from dual
                         union all select '||','||' from dual
                         union all select '=','=' from dual
                         union all select '!=','!=' from dual
                         union all select '&gt;=','&gt;=' from dual
                         union all select '&lt;=','&lt;=' from dual
                         union all select 'LIKE','IS NULL' from dual
                         union all select 'BETWEEN','BETWEEN' from dual
                         union all select 'IN','IN' from dual
                         union all select 'NOT','NOT' from dual
                         union all select 'NOT IN','NOT IN' from dual
                         union all select 'AND','AND' from dual
                         union all select 'OR','OR' from dual
                         union all select 'ANY SOME','ANY SOME' from dual
                         union all select 'ALL','ALL' from dual
                        union all select 'EXISTS','EXISTS' from dual
                        union all select 'ESCAPE','ESCAPE' from dual
                        union all select 'UNION','UNION' from dual
                        union all select 'UNION ALL','UNION ALL' from dual
                        union all select 'INTERSECT','INTERSECT' from dual
                        union all select 'MINUS','MINUS' from dual " ProviderName="<%$ ConnectionStrings:DefaultConnection.ProviderName %>"></asp:SqlDataSource>       
© www.soinside.com 2019 - 2024. All rights reserved.