Hidden field with repeater?

Hidden field with repeater?

Post by aaa » Tue, 03 May 2005 21:40:03


Hi again,

I have a repeater that is assign an object and cranks out a bunch of
checkboxes.
That part works fine.

How do I assign a hidden field, (a key field) to each of those checkboxes?
I was thinking a hidden label but that seems like such a kludge...

TB
 
 
 

1. Hiding Elements in a Repeater

2. repeater control usage, want to dynamically hide or display child checkboxes

Hello All,
I display a list of entries with a checkbox against them using a
repeater control bound to a database table. Based on the value of database
table I want to either show the checkbox for a row or not to show, how do I
accomplish that using a repeater control ?
Should I do something like this

<%if (((DataRowView)Container.DataItem)["bThisUserHasIt"] == 0)

{ %><asp:CheckBox ID="chkBookMarkID" text='<%#
((DataRowView)Container.DataItem)["nBookMarkID"] %>' runat="server"
ForeColor="White" Font-Size="1px" /<%} %>


(this one does not work , but I am thinking it might be possible to do it
like that, get this error, Error 2 The name 'Container' does not exist in
the current context
C:\Inetpub\wwwroot\allenandovery\bookmarks\recentbookmarks.aspx 24 35
C:\...\allenandovery\
)

or is there a better way to do it, checking and specifying the value in code
behind?


Thanks a lot for your support.
Imran.

3. Hide / Show Panels through a Repeater

4. ASP.NET Repeater Control - Hide a <div> ???

5. Nested Repeater Child Repeater Manipulation on Render

6. Nested repeaters -- accessing data from outer repeater

7. Repeater inside a repeater....how?

8. Repeater Using Javascript Referencing a Column in the Repeater

9. Livitron coupler/repeater disabling the repeater

10. 802.11g repeater repeating a repeater

11. Repeater within a Repeater

12. Repeater inside a Repeater

13. Question about using a repeater inside a repeater.

14. Repeater control with nested repeater

15. view image in repeater: if statement in a repeater control