471,066 Members | 1,184 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Repeater control question..

I have a class variable that stores values in the following format:

For Item1,
Action1 = true
Action2 = true
Quantity = 10

For Item2,
Action1 = true
Action2 = FALSE
Quantity = 5

I want to store the values in the above class in the following format.
If Action2 is FALSE, then dont display. ie: Note that Action2 is
missing in line 6 and is replaced with Quantity.

1. Action1 - Item1
2. Action2 - Item1
3. Quantity - 10
5. Action1 - Item2
6. Quantity - 5

What I could think of is - using a repeater control.
So this is what I am using now :

myRepeater.DataSource = myClass.Items

The HTML code is:
<asp:Repeater id="myRepeater" runat="server">
<td>Action1 - <%# DataBinder.Eval(Container.DataItem, "Action1")%>
<td>Action2 - <%# DataBinder.Eval(Container.DataItem, "Action2")%>
<td>Quantity:<%# DataBinder.Eval(Container.DataItem, "quantity")%>

But that leaves an empty line after 5. ie between 5 and 6 (as action 2
is empty here.)
Is there anything else I can use ?

Oct 17 '06 #1
0 708

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Fraggle | last post: by
4 posts views Thread by MattB | last post: by
1 post views Thread by olduncleamos | last post: by
7 posts views Thread by charliewest | last post: by
3 posts views Thread by Andrew | last post: by
12 posts views Thread by =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.