Results 1 to 2 of 2

Thread: Data bound DataList Template

  1. #1

    Thread Starter
    Frenzied Member TomGibbons's Avatar
    Join Date
    Feb 2002
    Location
    San Diego, CA Previous Location: UK
    Posts
    1,345

    Data bound DataList Template

    I have the following in my ItemTemplate:
    Code:
                        <div style="font-size: 7pt; font-style: italic; text-align: right;">
                             Added by <%# DataBinder.Eval(Container.DataItem, "addedbyname")%>  @ <%# DataBinder.Eval(Container.DataItem, "added") %><br />
                             Modified by <%# DataBinder.Eval(Container.DataItem, "updatedbyname") %> @ <%# DataBinder.Eval(Container.DataItem, "updated") %>
                        </div>
    Is there any way to hide the 'Modified By... ' line if 'updated' and 'added' are the same? If so, how?

    Thanks

  2. #2
    Hyperactive Member
    Join Date
    Jul 2000
    Location
    Europe, Lithuania
    Posts
    309

    Re: Data bound DataList Template

    Yes, there is and I think more then one way to do this.

    I think it can be done in this way:


    Reaplace code with <% FunctionName(container) %> or you can bound function to label.text property.
    Pass dataitem to function. Write your own logic in function to check values and return custom text.

    There must be some samples on web, I haven't it right now. Search for it.

    Hope helped.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width