[MonoDevelop] ASP.net repeater template

Kim Rasmussen kimr1508 at gmail.com
Fri Jan 27 17:45:52 UTC 2012


> Fixed? The table tag goes outside the repeat in the MS version as 
> well, unless it is a nested table in which case it would normally go 
> in the item template section. Of course I may not understand the way 
> you are using it but what I understand to be standard usage is the 
> table tags are outside the repeater because they are not to be repeated.
>
I believe the standard usage is putting the start and end table-tags in 
the headertemplate and footertemplate. I do the same thing in Visual Studio.

They do it the same way on a page like this:
http://www.w3schools.com/aspnet/aspnet_repeater.asp

The reason for putting the start and end tags in the header and 
footertemplates is. If nothing is going to be rendered in the table fx. 
the user don't have anything in the shopping basket, you'll not get any 
waste html on the page.

If you but the table tags outside of the repeater you'll end up with 
<table></table> on the page, which looks kind of strange.

A solution is of course to put the table-tags inside a asp:placeholder, 
which is set to visible=false, if nothing is going to be rendered in the 
table, but that is extra work.


Best wishes,
Kim

> On 1/27/2012 10:13 AM, Kim Rasmussen wrote:
>> Hi,
>>
>> When developing asp.net pages with Monodevelop a really annoying bug 
>> is the validation of asp:repeater elements.
>>
>> The example below is marked as an error by the compile validator:
>> <asp:repeater id="rpTest" runat="server">
>> <headertemplate>
>> <table>
>> </headertemplate>
>> <itemtemplate>
>> <tr><td>Test</td></tr>
>> </itemtemplate>
>> <footertemplate>
>> <table>
>> </footertemplate>
>> </asp:repeater>
>>
>> So in order to make this html work, I have to move the table-tag 
>> outside of the asp:repeater.
>>
>> Is there a way to fix this? Or at least to turn off the compile 
>> validator?
>>
>>
>> Best regards,
>> Kim
>>
>>
>> _______________________________________________
>> Monodevelop-list mailing list
>> Monodevelop-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>
>
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodevelop-list/attachments/20120127/91edb74a/attachment.html>


More information about the Monodevelop-list mailing list