A
Anonieko
Hello ASPNET guru's,
What is a clean way to go around the problem of displaying a GridView
templated column where data can contain Single Quote ( ' )?
I maybe too naive, but this is of course a common scenario.
Scenario:
* My database returns names that can contain single quote.
* For example: O'byran, D'Ottwa, Osan's , and so on.
* I use a Gridview to view the data ( ASPNET 2.0 RTM)
* If that GridView column is a Bound Column. NO PROBLEM.
* If you convert that column into a Templated Column, error on
javascript on runtime.
Right now, I just remedy this by going to the database SELECT
statement (or stored proc) and removing the single quote. But what is
the real solution here?
Thanks,
What is a clean way to go around the problem of displaying a GridView
templated column where data can contain Single Quote ( ' )?
I maybe too naive, but this is of course a common scenario.
Scenario:
* My database returns names that can contain single quote.
* For example: O'byran, D'Ottwa, Osan's , and so on.
* I use a Gridview to view the data ( ASPNET 2.0 RTM)
* If that GridView column is a Bound Column. NO PROBLEM.
* If you convert that column into a Templated Column, error on
javascript on runtime.
Right now, I just remedy this by going to the database SELECT
statement (or stored proc) and removing the single quote. But what is
the real solution here?
Thanks,