View Single Post
  #3 (permalink)  
Old May 1st, 2007, 12:59 AM
nittin14 nittin14 is offline
Authorized User
 
Join Date: Apr 2007
Location: delhi, delhi, India.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

helo sir,
 this is not working
it is giving error:

 BC30201: Expression expected

i m using ur solution in datalist like this:

<%# DataBinder.Eval(Container.DataItem,"promotiondue") == DBNull.Value.ToString() ? "Date not filled" : DataBinder.Eval(Container.DataItem,"promotiondue") %>

but they r not executing
can u send the sloution


Quote:
quote:Originally posted by mike_remember
 Depends how you are filling your datalist, one way could be checking for null from database itself using the ISNULL function, another way could be checking for null while binding, something like below:

<asp:Label Runat="server" ID="lblTest" text='<%#DataBinder.Eval(Container.DataItem,"no")= = DBNull.Value.ToString() ? "Date not filled" : DataBinder.Eval(Container.DataItem,"no")%>'>

There could be lot other ways too....

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.