Results 1 to 3 of 3

Thread: Container.DataItem

  1. #1
    Join Date
    Dec 1969

    Default Container.DataItem

    Hello!!<BR>I´m doing a poll and now i want to divide the part with the total, but how<BR>do i do that the easiest way ....<BR><BR>the way i buildt it up now is by binding a dataset to a datalist and then<BR>i´m looping thru the hole thing.....<BR><BR>But when i want to bring up the % i´m stuck.....i have tried to do something<BR>like this<BR><BR>&#060;%#((Container.DataItem, "f_hits") / (Container.DataItem, "NoOfAnswers"))%&#062;<BR><BR>But that not right.<BR><BR>Can someone help me with this<BR>

  2. #2
    Join Date
    Dec 1969

    Default Are you using C#?

    You should be able to use<BR><BR>&#060;%# DataBinder.Eval(Container.DataItem, "f_hits") / DataBinder.Eval(Container.DataItem, "NoOfAnswers") %&#062;

  3. #3
    Join Date
    Dec 1969

    Default RE: Container.DataItem

    try this:<BR>&#060;%# DataBinder.Eval(Container.DataItem, "item1")/DataBinder.Eval(Container.DataItem,"item2" %&#062;

Posting Permissions

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