Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Add 2 values in Repeater

Add 2 values in Repeater

Scheduled Pinned Locked Moved ASP.NET
dockerxmlquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    butchzn
    wrote on last edited by
    #1

    :) Hi All, I have a repeater that uses an XML file as its datasource. I want to add 2 of the retrieved values. How would i do this without messing with the DataSet in code behind? <ItemTemplate> <td> <%# DataBinder.Eval(Container.DataItem, "ISLTournamentBuyIn")%> + <%# DataBinder.Eval(Container.DataItem, "ISLTournamentFee")%> </td> </ItemTemplate> Thanks.

    T 1 Reply Last reply
    0
    • B butchzn

      :) Hi All, I have a repeater that uses an XML file as its datasource. I want to add 2 of the retrieved values. How would i do this without messing with the DataSet in code behind? <ItemTemplate> <td> <%# DataBinder.Eval(Container.DataItem, "ISLTournamentBuyIn")%> + <%# DataBinder.Eval(Container.DataItem, "ISLTournamentFee")%> </td> </ItemTemplate> Thanks.

      T Offline
      T Offline
      ToddHileHoffer
      wrote on last edited by
      #2

      The easiest way to do this would be to get a data table from the dataset, add two new rows and bind the repeater. That way you aren't changing the dataset but you are getting the results you want.

      I didn't get any requirements for the signature

      B 1 Reply Last reply
      0
      • T ToddHileHoffer

        The easiest way to do this would be to get a data table from the dataset, add two new rows and bind the repeater. That way you aren't changing the dataset but you are getting the results you want.

        I didn't get any requirements for the signature

        B Offline
        B Offline
        butchzn
        wrote on last edited by
        #3

        Hi Todd, Thanks for your response.:cool: While your solution is one that will work i eventually found a way to do it all front end :) <ItemTemplate> <td><%#(Convert.ToInt32(Eval("Column1")) +Convert.ToInt32(Eval("Column2"))/100)%></td> </ItemTemplate> Thanks again.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups