Link to home
Start Free TrialLog in
Avatar of flukester
flukester

asked on

Option Strict On disallows late binding with IIf

Why do I get a option strict on disallows late binding with the following code below?

 <%#IIf(IsDBNull(Container.DataItem("APSEVENT")), "", "<img src=" & Container.DataItem("APSEVENT") & " alt="""" />")%>

APSEVENT is a varchar(50)

Thanks

ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of flukester
flukester

ASKER

No, I don't really have to. I found some comments online and tried some of the conversions, but couldn't get anything to work. I'm going to add a web.config at the app level and set option strict to false.
I can't remember the last time that I used Option Strict On.  I feel like it is a crutch that covers up for good code design.

Bob