how to use if else in eval using Repeater RRS feed

  • Question

  • Hi,

    i am using Repeater Control . I want to apply if else condition with "and && " Operator

    currently i am doing like this

     <% if(string.IsNullOrEmpty(Convert.ToString(Eval("ProgramName"))) &&
                                                        { Eval("ProjectNameEnglish"); }
                                                        { DateTime.Now.ToString(); }


    Its giving me error..

    Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

    How to solve this .Kindly Help me out


    Monday, August 28, 2017 12:05 PM

All replies

  • Hi,

    As Repeating control is more related to .NET Framework, I would suggest you can create a new thread in .NET forum, you will get more detailed information from there and more experts there will help you:



    Best Regards

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, August 29, 2017 7:50 AM