I
Imran Aziz
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.
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.