I implemented a RepeaterTester myself prior to having noticed
this patch. Just as a heads up, I believe you may run into
some problems using this if the repeater includes a header
and/or separator template. Index 0 is given to a header if it
exists, and separators are given every other index.
In my GetChildElementHtmlId I ended up writing something like
this:
// Adjust the index based on the presence of header or
separator templates
int adjustedItemNumber = int.Parse(aspId);
if (hasSeparator) adjustedItemNumber *= 2;
if (hasHeader) adjustedItemNumber += 1;
This required that in my tests I hardcode into my construct of
a RepeaterTester whether or not a header or separator
template exists (2 additional booleans on the constructor).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1003735
I implemented a RepeaterTester myself prior to having noticed
this patch. Just as a heads up, I believe you may run into
some problems using this if the repeater includes a header
and/or separator template. Index 0 is given to a header if it
exists, and separators are given every other index.
In my GetChildElementHtmlId I ended up writing something like
this:
// Adjust the index based on the presence of header or
separator templates
int adjustedItemNumber = int.Parse(aspId);
if (hasSeparator) adjustedItemNumber *= 2;
if (hasHeader) adjustedItemNumber += 1;
return HtmlId + "__ctl" + adjustedItemNumber + "_" + aspId;
This required that in my tests I hardcode into my construct of
a RepeaterTester whether or not a header or separator
template exists (2 additional booleans on the constructor).
Logged In: YES
user_id=499667
I cannot integrate this patch as it does not include a
copyright assignment.
A RepeaterTester will be included in the next release of
NUnitAsp courtesy of Ben Monro. The RepeaterTester is based
on patch #1184020.