Thus, I basically beat my head off the wall for a while. Excuse me if I throw too much code, I don’t know a better way to explain this. I have a repeater with ItemTemplate from:
<ItemTemplate>
<div id='FileFrame<%#Eval("Id")%>' class="view">
<userControl:ConfigFiles ID=<%#Eval("Id")%> runat="server" />
</div>
</ItemTemplate>
Some jQuery that set a dialog box for a div.
$(document).ready(function() {
$(".view").dialog({
autoOpen: false,
title: "Configuration Files",
buttons: {},
height: 600,
width: 800,
open: function (type, data) { $(this).parent().appendTo("form"); }
});
});
and some more jQuery that open the dialog.
$("#FileFrame"+ConfigId).dialog('open');
Now the user control contains a bunch of flags inside other repeaters along with the "Load control cells" button. The problem is that when I look through the debugs and click the button, none of these flags are ever read as checked, unless I set Checked = "true" on the aspx page.
Here is a snippet of code where it cannot do what I thought it should do.
foreach (RepeaterItem item in FilesRepeater.Items)
{
CheckBox box = item.FindControl("DownloadFileCheckBox") as CheckBox;
if (box.Checked) //<-- always false unless I set it to true in aspx,
// then it always true
{/*do work here*/}
}
?