How to use Single Quotes in Eval Format String

前端 未结 4 1152
北海茫月
北海茫月 2020-12-11 17:20

I\'ve got a Repeater and its SqlDatasource nested inside a Gridview TemplatedField.
The Repeater\'s datasource SelectCommand is set using the FormatString of an Eval fro

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-11 18:10

    Have you tried escaping the single quote characters?

    ... WHERE (StringField = \'{0}\') ...
    

提交回复
热议问题