asp.net - Complex items in WebForms ListView -
i'm using listview in webformsapplication. listview generates table (currently) 3 columns. "username", "organization" , "locked". these represented string, string , checkbox respectively. checkbox should postback on change, (possibly) question...
should use <%# eval("username") %>
or <asp:literal blablah>
inject data? more relevant checkbox... seems "dirty" write <input type="checkbox" id="something" <%# if ((bool)eval("locked") == true) /* unknown code outputting "checked" */ ;%> />
or should use container alltogether?
for checkbox, why not asp checkbox control like:
<asp:checkbox id="c" runat="server" checked='<%# eval("locked") %>' />
to handle checkbox checking little more cleanly? think control support auto postback on check change.
for other question, wouldn't worry literals unless need access value. if do, use label personally, control used.
hth.
Comments
Post a Comment