Convert bit to boolean string in HyperLinkField.DataNavigateUrlFormatString
Posted
by abatishchev
on Stack Overflow
See other posts from Stack Overflow
or by abatishchev
Published on 2010-04-11T14:24:40Z
Indexed on
2010/04/11
17:23 UTC
Read the original article
Hit count: 146
I have a asp:GridView
with a HyperLinkField
. It's DataNavigateUrlFormatString
property is set to View.aspx?id={0}&isTechnical={1}
Select command of appropriate SqlDataSource
returns columns of type INT
and BIT
(from SQL Server 2008).
So displayed string becomes something like View.aspx?id=1&isTechnical=1
. But I want to display isTechnical=true|False
, i.e. Convert.ToBoolean(row["isTechnical"]).ToString().ToLowerInvariant()
.
How to implement such conversion in page markup?
© Stack Overflow or respective owner