that's got me tearing my hair out! I'm wanting to have a repeater that
adds some rows to a table as below:
<asp:Repeater ID="repeater1" runat="server">
<HeaderTemplate>
<table id="table1" runat="server">
<tr>{header code goes here}</tr>
</HeaderTemplate>
<ItemTemplate>
<tr><td>
<asp:DropDownList ID="ddl1" runat="server">{drop-down list code goes
here}</asp:DropDownList>
</td></tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
1. However, because of the 'runat="server"' in the table tag, this
throws an 'Unexpected end of file looking for </HeaderTemplatetag'
error.
2. Removing the 'runat="server"' means that the code DOES compile -
however it seems to have the effect that whenever I try to do anything
with my drop-down list in the page-behind vb gives me a 'Object
reference not set to an instance of an object' error (not a problem
with the way I'm coding because the same line works fine in the vb if
the drop-down list is placed OUTSIDE of the table).
3. Also, the only other way I can think of to do this, to use an
<asp:tableinstead (which was actually my preferred choice if I could
have got it working) gives a 'Server elements cannot span templates'
error.
Aaargghhh! There MUST be some way of having a repeater in a table as
above, AND allow server controls (that are actually useable) within
it. Can anyone help, as my head is sore from banging it against the
wall so much!
Many, many thanks indeed.Are you sure it's an error? I use this technique all the time, it does flag
up as a *warning*, but just ignore it.
<mj.redfox.mj@dotnet.itags.org.gmail.comwrote in message
news:1172763165.984403.148440@dotnet.itags.org.z35g2000cwz.googlegr oups.com...
Quote:
Originally Posted by
Hello, I'm hoping someone can help me out with a very basic problem
that's got me tearing my hair out! I'm wanting to have a repeater that
adds some rows to a table as below:
>
>
<asp:Repeater ID="repeater1" runat="server">
>
<HeaderTemplate>
<table id="table1" runat="server">
<tr>{header code goes here}</tr>
</HeaderTemplate>
>
<ItemTemplate>
<tr><td>
<asp:DropDownList ID="ddl1" runat="server">{drop-down list code goes
here}</asp:DropDownList>
</td></tr>
</ItemTemplate>
>
<FooterTemplate>
</table>
</FooterTemplate>
>
>
1. However, because of the 'runat="server"' in the table tag, this
throws an 'Unexpected end of file looking for </HeaderTemplatetag'
error.
>
2. Removing the 'runat="server"' means that the code DOES compile -
however it seems to have the effect that whenever I try to do anything
with my drop-down list in the page-behind vb gives me a 'Object
reference not set to an instance of an object' error (not a problem
with the way I'm coding because the same line works fine in the vb if
the drop-down list is placed OUTSIDE of the table).
>
3. Also, the only other way I can think of to do this, to use an
<asp:tableinstead (which was actually my preferred choice if I could
have got it working) gives a 'Server elements cannot span templates'
error.
>
>
Aaargghhh! There MUST be some way of having a repeater in a table as
above, AND allow server controls (that are actually useable) within
it. Can anyone help, as my head is sore from banging it against the
wall so much!
>
Many, many thanks indeed.
>
Hi Aidy,
Thanks for replying. Can I just ask which of the three techniques you
use...
1. <asp:table>
2. <table>
or
3. <table runat = "server">?
On 1 Mar, 15:54, "Aidy" <a...@dotnet.itags.org.noemail.xxxa.comwrote:
Quote:
Originally Posted by
Are you sure it's an error? I use this technique all the time, it does flag
up as a *warning*, but just ignore it.
>
<mj.redfox...@dotnet.itags.org.gmail.comwrote in message
>
news:1172763165.984403.148440@dotnet.itags.org.z35g2000cwz.googlegr oups.com...
>
>
>
Quote:
Originally Posted by
Hello, I'm hoping someone can help me out with a very basic problem
that's got me tearing my hair out! I'm wanting to have a repeater that
adds some rows to a table as below:
>
Quote:
Originally Posted by
<asp:Repeater ID="repeater1" runat="server">
>
Quote:
Originally Posted by
<HeaderTemplate>
<table id="table1" runat="server">
<tr>{header code goes here}</tr>
</HeaderTemplate>
>
Quote:
Originally Posted by
<ItemTemplate>
<tr><td>
<asp:DropDownList ID="ddl1" runat="server">{drop-down list code goes
here}</asp:DropDownList>
</td></tr>
</ItemTemplate>
>
Quote:
Originally Posted by
<FooterTemplate>
</table>
</FooterTemplate>
>
Quote:
Originally Posted by
1. However, because of the 'runat="server"' in the table tag, this
throws an 'Unexpected end of file looking for </HeaderTemplatetag'
error.
>
Quote:
Originally Posted by
2. Removing the 'runat="server"' means that the code DOES compile -
however it seems to have the effect that whenever I try to do anything
with my drop-down list in the page-behind vb gives me a 'Object
reference not set to an instance of an object' error (not a problem
with the way I'm coding because the same line works fine in the vb if
the drop-down list is placed OUTSIDE of the table).
>
Quote:
Originally Posted by
3. Also, the only other way I can think of to do this, to use an
<asp:tableinstead (which was actually my preferred choice if I could
have got it working) gives a 'Server elements cannot span templates'
error.
>
Quote:
Originally Posted by
Aaargghhh! There MUST be some way of having a repeater in a table as
above, AND allow server controls (that are actually useable) within
it. Can anyone help, as my head is sore from banging it against the
wall so much!
>
Quote:
Originally Posted by
Many, many thanks indeed.- Hide quoted text -
>
- Show quoted text -
I use the repeater;
<HeaderTemplate>
<table>
</HeaderTemplate>
<ItemTemplate>
<tr>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
<mj.redfox.mj@dotnet.itags.org.gmail.comwrote in message
news:1172764802.765456.68170@dotnet.itags.org.h3g2000cwc.googlegrou ps.com...
Quote:
Originally Posted by
Hi Aidy,
>
Thanks for replying. Can I just ask which of the three techniques you
use...
1. <asp:table>
2. <table>
or
3. <table runat = "server">?
>
On 1 Mar, 15:54, "Aidy" <a...@dotnet.itags.org.noemail.xxxa.comwrote:
Quote:
Originally Posted by
>Are you sure it's an error? I use this technique all the time, it does
>flag
>up as a *warning*, but just ignore it.
>>
><mj.redfox...@dotnet.itags.org.gmail.comwrote in message
>>
>news:1172763165.984403.148440@dotnet.itags.org.z35g2000cwz.googlegr oups.com...
>>
>>
>>
Quote:
Originally Posted by
Hello, I'm hoping someone can help me out with a very basic problem
that's got me tearing my hair out! I'm wanting to have a repeater that
adds some rows to a table as below:
>>
Quote:
Originally Posted by
<asp:Repeater ID="repeater1" runat="server">
>>
Quote:
Originally Posted by
<HeaderTemplate>
<table id="table1" runat="server">
<tr>{header code goes here}</tr>
</HeaderTemplate>
>>
Quote:
Originally Posted by
<ItemTemplate>
<tr><td>
<asp:DropDownList ID="ddl1" runat="server">{drop-down list code goes
here}</asp:DropDownList>
</td></tr>
</ItemTemplate>
>>
Quote:
Originally Posted by
<FooterTemplate>
</table>
</FooterTemplate>
>>
Quote:
Originally Posted by
1. However, because of the 'runat="server"' in the table tag, this
throws an 'Unexpected end of file looking for </HeaderTemplatetag'
error.
>>
Quote:
Originally Posted by
2. Removing the 'runat="server"' means that the code DOES compile -
however it seems to have the effect that whenever I try to do anything
with my drop-down list in the page-behind vb gives me a 'Object
reference not set to an instance of an object' error (not a problem
with the way I'm coding because the same line works fine in the vb if
the drop-down list is placed OUTSIDE of the table).
>>
Quote:
Originally Posted by
3. Also, the only other way I can think of to do this, to use an
<asp:tableinstead (which was actually my preferred choice if I could
have got it working) gives a 'Server elements cannot span templates'
error.
>>
Quote:
Originally Posted by
Aaargghhh! There MUST be some way of having a repeater in a table as
above, AND allow server controls (that are actually useable) within
it. Can anyone help, as my head is sore from banging it against the
wall so much!
>>
Quote:
Originally Posted by
Many, many thanks indeed.- Hide quoted text -
>>
>- Show quoted text -
>
>
Could it be that the problem is that the header template opens outside
the <tabletag and ends inside it? Could you move the opening table
tag below the header template?
On Mar 1, 11:07 am, "Aidy" <a...@dotnet.itags.org.noemail.xxxa.comwrote:
Quote:
Originally Posted by
I use the repeater;
>
<HeaderTemplate>
<table>
</HeaderTemplate>
>
<ItemTemplate>
<tr>
>
</tr>
</ItemTemplate>
>
<FooterTemplate>
</table>
</FooterTemplate>
>
<mj.redfox...@dotnet.itags.org.gmail.comwrote in message
>
news:1172764802.765456.68170@dotnet.itags.org.h3g2000cwc.googlegrou ps.com...
>
>
>
Quote:
Originally Posted by
Hi Aidy,
>
Quote:
Originally Posted by
Thanks for replying. Can I just ask which of the three techniques you
use...
1. <asp:table>
2. <table>
or
3. <table runat = "server">?
>
Quote:
Originally Posted by
On 1 Mar, 15:54, "Aidy" <a...@dotnet.itags.org.noemail.xxxa.comwrote:
Quote:
Originally Posted by
Are you sure it's an error? I use this technique all the time, it does
flag
up as a *warning*, but just ignore it.
>
Quote:
Originally Posted by
Quote:
Originally Posted by
<mj.redfox...@dotnet.itags.org.gmail.comwrote in message
>
Quote:
Originally Posted by
Quote:
Originally Posted by
>news:1172763165.984403.148440@dotnet.itags.org.z35g2000cwz.googlegr oups.com...
>
Quote:
Originally Posted by
Quote:
Originally Posted by
Hello, I'm hoping someone can help me out with a very basic problem
that's got me tearing my hair out! I'm wanting to have a repeater that
adds some rows to a table as below:
>
Quote:
Originally Posted by
Quote:
Originally Posted by
<asp:Repeater ID="repeater1" runat="server">
>
Quote:
Originally Posted by
Quote:
Originally Posted by
<HeaderTemplate>
<table id="table1" runat="server">
<tr>{header code goes here}</tr>
</HeaderTemplate>
>
Quote:
Originally Posted by
Quote:
Originally Posted by
<ItemTemplate>
<tr><td>
<asp:DropDownList ID="ddl1" runat="server">{drop-down list code goes
here}</asp:DropDownList>
</td></tr>
</ItemTemplate>
>
Quote:
Originally Posted by
Quote:
Originally Posted by
<FooterTemplate>
</table>
</FooterTemplate>
>
Quote:
Originally Posted by
Quote:
Originally Posted by
1. However, because of the 'runat="server"' in the table tag, this
throws an 'Unexpected end of file looking for </HeaderTemplatetag'
error.
>
Quote:
Originally Posted by
Quote:
Originally Posted by
2. Removing the 'runat="server"' means that the code DOES compile -
however it seems to have the effect that whenever I try to do anything
with my drop-down list in the page-behind vb gives me a 'Object
reference not set to an instance of an object' error (not a problem
with the way I'm coding because the same line works fine in the vb if
the drop-down list is placed OUTSIDE of the table).
>
Quote:
Originally Posted by
Quote:
Originally Posted by
3. Also, the only other way I can think of to do this, to use an
<asp:tableinstead (which was actually my preferred choice if I could
have got it working) gives a 'Server elements cannot span templates'
error.
>
Quote:
Originally Posted by
Quote:
Originally Posted by
Aaargghhh! There MUST be some way of having a repeater in a table as
above, AND allow server controls (that are actually useable) within
it. Can anyone help, as my head is sore from banging it against the
wall so much!
>
Quote:
Originally Posted by
Quote:
Originally Posted by
Many, many thanks indeed.- Hide quoted text -
>
Quote:
Originally Posted by
Quote:
Originally Posted by
- Show quoted text -- Hide quoted text -
>
- Show quoted text -
0 comments:
Post a Comment