IIF problem

V

Vishal

Hello,

I am using IIF in my datagrid - ItemTemplate. In my
true part I call a function and pass the parameter which I
have retrieved from the database. The value can be also
null and therefore I am checking for Is Not DBNull,
however it still executes the true part. BUT when I
replace the true part with a simple string then it only
executes the true part when it is not NULL. Here is what I
try:

<%# IIF (NOT IsDBNull(Container.DataItem("data")),
DoSomething(Container.DataItem("Password")), "")%>

Can somebody guid me?
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top