Welcome to Mediachase Community Sign in | Join | Help    
in Search   

If condition in ItemTemplate

Last post Thu, Nov 18 2004, 4:33 PM by Sasha. 3 replies.
Sort Posts: Previous Next
  •  Tue, Nov 16 2004, 3:47 PM 904

    If condition in ItemTemplate

    Can we use conditional statements in the MonthItemTemplate such as:
    <% If #DataBinder.Eval(Container.DataItem,"StatusID") = 1 then %>
    .....
    <% End If%>

    thanks
  •  Tue, Nov 16 2004, 4:37 PM 905 in reply to 904

    Re: If condition in ItemTemplate

    No, i don't think you can do it in templates. The monthitemtemplate is the same template as the ones used in original controls (like datagrid).

    You can insert controls in the template which then can have a logic necessary.

    For example you can have:

    <mycontrol:SomeLogicControl runat=server Status=<%#DataBinder.Eval(Container.DataItem,"StatusID")%>/>

    and then this new SomeLogicControl can have the if statement.
  •  Wed, Nov 17 2004, 5:49 AM 909 in reply to 905

    Re: If condition in ItemTemplate

    I have a question:
    When I use <%#Container.DataItem("StatusID")%>

    instead of
    <%#DataBinder.Eval(Container.DataItem, "StatusID")%>
    in the item template it doesn't work.
    It gives and error :
    No default member found for type 'Calendar'.
  •  Thu, Nov 18 2004, 4:33 PM 919 in reply to 909

    Re: If condition in ItemTemplate

    We will look into correcting this.
View as RSS news feed in XML
Site Terms | Privacy Policy | About Us | Contact Us
Running on Mediachase eCommerce Framework 4.0.
  Copyright © Mediachase, LTD. 1997-2006. All Rights Reserved

E-commerce, HelpDesk, Service Desk & Project Management Software, alternatives to Microsoft Project Server & Sharepoint Collaboration Server
project management software | microsoft project server | sharepoint collaboration server | issues management, helpdesk & service desk
Powered by Community Server, by Telligent Systems