Updating ReflectOn.NameOf to support indexer calls

This is so that we can write stuff like this in aspx pages:
name="<%=Html.NameOf(m => m.PageEntries[pageIndex].PageId)%>"

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4038939
This commit is contained in:
rpaquay
2009-11-08 06:23:03 +00:00
parent 72851737cc
commit ace78cfd33
8 changed files with 239 additions and 27 deletions

View File

@@ -99,9 +99,8 @@ string SplitDateTime(DateTime dt)
%>
<tr>
<td>
<%--TODO: Use "NameOf" when it supports these expressions--%>
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%=string.Format("PageEntries[{0}].PageId", pageIndex)%>"/>
<input type="checkbox" value="true" name="<%=string.Format("PageEntries[{0}].IsChecked", pageIndex)%>"/>
<input type="hidden" value="<%=Model.PageEntries[pageIndex].PageId %>" name="<%=Html.NameOf(m => m.PageEntries[pageIndex].PageId)%>"/>
<input type="checkbox" value="true" name="<%=Html.NameOf(m => m.PageEntries[pageIndex].IsChecked)%>"/>
</td>
<td>
<% if (pageEntry.IsPublished) { %>