why am I getting this error?

J

Jassim Rahma

here is the error:
Literal content ('<asp:TableRow BackColor="white"') is not allowed within a
'System.Web.UI.WebControls.TableRowCollection'.


and here is my code:

<asp:TableRow BackColor="white">
<asp:TableCell VerticalAlign="Top">Your Message</asp:TableCell>
<asp:TableCell VerticalAlign="Top">:</asp:TableCell>
<asp:TableCell VerticalAlign="Top"><asp:TextBox ID="txtMessage"
runat="server" BackColor="LightGoldenrodYellow" BorderStyle="Groove"
Width="500" Height="100" TextMode="MultiLine"
></asp:TextBox></asp:TableCell>
</asp:TableRow>



[ERROR COMES ON THIS LINE]
<asp:TableRow BackColor="white"><asp:TableCell ColumnSpan="3"
VerticalAlign="Middle"><br /></asp:TableCell></asp:TableRow>




<asp:TableRow BackColor="white">
<asp:TableCell VerticalAlign="Top"></asp:TableCell>
<asp:TableCell VerticalAlign="Top"></asp:TableCell>
<asp:TableCell VerticalAlign="Top"><asp:Button ID="btnSend" runat="server"
Text=" send now " OnClick="btnSend_Click" /></asp:TableCell>
</asp:TableRow>
 
G

Guest

here is the error:
Literal content ('<asp:TableRow BackColor="white"') is not allowed within a
'System.Web.UI.WebControls.TableRowCollection'.

and here is my code:

<asp:TableRow BackColor="white">
<asp:TableCell VerticalAlign="Top">Your Message</asp:TableCell>
<asp:TableCell VerticalAlign="Top">:</asp:TableCell>
<asp:TableCell VerticalAlign="Top"><asp:TextBox ID="txtMessage"
runat="server" BackColor="LightGoldenrodYellow" BorderStyle="Groove"
Width="500" Height="100" TextMode="MultiLine"
</asp:TextBox></asp:TableCell>
</asp:TableRow>

[ERROR COMES ON THIS LINE]
<asp:TableRow BackColor="white"><asp:TableCell ColumnSpan="3"
VerticalAlign="Middle"><br /></asp:TableCell></asp:TableRow>

<asp:TableRow BackColor="white">
<asp:TableCell VerticalAlign="Top"></asp:TableCell>
<asp:TableCell VerticalAlign="Top"></asp:TableCell>
<asp:TableCell VerticalAlign="Top"><asp:Button ID="btnSend" runat="server"
Text=" send now " OnClick="btnSend_Click" /></asp:TableCell>
</asp:TableRow>

If I copy your code to my application, it shows me a table with an
input form. No error occurred
 
B

Brandon Gano

My guess is you have a stray character somewhere outside an <asp:TableCell
/>. Possibly an extra < or >?


Jassim Rahma said:
here is the error:
Literal content ('<asp:TableRow BackColor="white"') is not allowed within
a 'System.Web.UI.WebControls.TableRowCollection'.


and here is my code:

<asp:TableRow BackColor="white">
<asp:TableCell VerticalAlign="Top">Your Message</asp:TableCell>
<asp:TableCell VerticalAlign="Top">:</asp:TableCell>
<asp:TableCell VerticalAlign="Top"><asp:TextBox ID="txtMessage"
runat="server" BackColor="LightGoldenrodYellow" BorderStyle="Groove"
Width="500" Height="100" TextMode="MultiLine"
</asp:TextBox></asp:TableCell>
</asp:TableRow>



[ERROR COMES ON THIS LINE]
<asp:TableRow BackColor="white"><asp:TableCell ColumnSpan="3"
VerticalAlign="Middle"><br /></asp:TableCell></asp:TableRow>




<asp:TableRow BackColor="white">
<asp:TableCell VerticalAlign="Top"></asp:TableCell>
<asp:TableCell VerticalAlign="Top"></asp:TableCell>
<asp:TableCell VerticalAlign="Top"><asp:Button ID="btnSend" runat="server"
Text=" send now " OnClick="btnSend_Click" /></asp:TableCell>
</asp:TableRow>
 
J

Jassim Rahma

i have just uploaded the same file again and it worked fine..

thank you


Jassim Rahma said:
here is the error:
Literal content ('<asp:TableRow BackColor="white"') is not allowed within
a 'System.Web.UI.WebControls.TableRowCollection'.


and here is my code:

<asp:TableRow BackColor="white">
<asp:TableCell VerticalAlign="Top">Your Message</asp:TableCell>
<asp:TableCell VerticalAlign="Top">:</asp:TableCell>
<asp:TableCell VerticalAlign="Top"><asp:TextBox ID="txtMessage"
runat="server" BackColor="LightGoldenrodYellow" BorderStyle="Groove"
Width="500" Height="100" TextMode="MultiLine"
</asp:TextBox></asp:TableCell>
</asp:TableRow>



[ERROR COMES ON THIS LINE]
<asp:TableRow BackColor="white"><asp:TableCell ColumnSpan="3"
VerticalAlign="Middle"><br /></asp:TableCell></asp:TableRow>




<asp:TableRow BackColor="white">
<asp:TableCell VerticalAlign="Top"></asp:TableCell>
<asp:TableCell VerticalAlign="Top"></asp:TableCell>
<asp:TableCell VerticalAlign="Top"><asp:Button ID="btnSend" runat="server"
Text=" send now " OnClick="btnSend_Click" /></asp:TableCell>
</asp:TableRow>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top