Results 1 to 3 of 3

Thread: formatting html depending on values in dataset

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    formatting html depending on values in dataset

    hi all

    in my code bind im populating a repeater via dataset and calling values using

    VB Code:
    1. <%# DataBinder.Eval(Container, "DataItem.control") %>

    i wish to display a button so depending on the value of control (bit value i.e. 0 = false 1 = true)

    so something like (not real code just to show what i wana do)

    <% if # DataBinder.Eval(Container, "DataItem.control") = 1 then
    <img src="buttontrue.jpg">
    <%else%>
    <img src="buttonfalse.jpg">
    <%end if%>
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Refer to this post, it answers your problem:

    http://www.vbforums.com/showthread.p...hreadid=275214

  3. #3

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    thanks mate

    I worked out about the public function from coming across something on asp.net

    Thanks anyway mate

    Hope all is well
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

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