Как ввести текст «<» и «>» для источника данных sql в asp.net - PullRequest
0 голосов
/ 04 февраля 2019

Я не могу поместить это sqlcommand в SqlDataSource.

<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>             

Это моя ошибка.

введите описание изображения здесь

1 Ответ

0 голосов
/ 06 февраля 2019

Я могу отредактировать его, введя &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>       
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...