Conversion in ASP.NET expressions

G

Guest

Hello,

I have created my own simple ASP.NET expression. It looks like <%$
InstanceSettings:Name %>. It access NameValueCollection and returns string
value. At the moment I need to convert this string to bool for one case
because I use it to evalueate Visibility of column in templated grid view.

I am trying to do something like this:
<asp:BoundField Visible="<%$ InstanceSettings:UseOrg %>" ....
but it fails because no implicit conversion between string and bool exists.

How can I use conversion in ASP.NET expressions?

Thank you in advance,
Ladislav Mrnka
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top