简体   繁体   English

如何允许大于和小于sqldatasource中的字符串参数

[英]How to allow greater than and less than in sqldatasource string parameter

I'm using a RadGrid and an SqlDataSource to make select, insert and update statements over a database table. 我正在使用RadGrid和SqlDataSource在数据库表上进行选择,插入和更新语句。

There is a string parameter in which I need to write down texts including tags, for example: 有一个字符串参数,我需要在其中写下包括标签的文本,例如:

"Name: <Name>, Address: <address>". 

I'm having the problem that the SqlDataSource prevents the use of greater than ">" and less than "<" characters in the attribute values. 我遇到的问题是SqlDataSource禁止在属性值中使用大于“>”和小于“ <”的字符。

How can I achieve the SqlDataSource parameters allow me to use the greater than and less than characters? 如何实现SqlDataSource参数,允许我使用大于和小于字符?

Try using the HTML tag. 尝试使用HTML标记。

&gt; = >
&lt; = <

You should be able to do the follow according to XML specifications. 您应该能够根据XML规范执行以下操作。 I'm not clear why this would be part of a data source and I suspect the real answer would be different if I knew what you were actually doing. 我不清楚为什么这将成为数据源的一部分,并且我怀疑如果我知道您的实际工作,实际答案会有所不同。

"Name: &lt;Name&gt;, Address: &lt;address&gt;".

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM