H
Hetal
Hi,
I have been working on creating a dynamic table with controls on a
ASP.NET webpage and i have been using literal controls to do that. The
issue that i am facing is, when i have the Start and End tag as 2
different literal controls, they do not seem to form a part of my
table. Below is the example.
'This code works fine.
================
Dim StartLiteral As String, EndLiteral As String
Function Literal(ByVal HTMLCode As String)
Dim litCode As New Literal
litCode.Text = HTMLCode
Literal = litCode
End Function
StartLiteral = "<tr> <td align=""center"" bgcolor=""#ffffff""
colspan=""2""> <font face=""Verdana, Arial, Helvetica"">Test Info"
EndLiteral = "</font> </td> </tr>"
plhTMReview.Controls.Add(Literal(StartLiteral))
plhTMReview.Controls.Add(Literal(EndLiteral))
=================
'But this code doesnt.
====================
StartLiteral = "<tr> <td align=""center"" bgcolor=""#ffffff""
colspan=""2"">"
plhTMRequest.Controls.Add(Literal(StartLiteral))
StartLiteral = "<font face=""Verdana, Arial, Helvetica"">Test Info"
EndLiteral = "</font> <br>"
plhTMReview.Controls.Add(Literal(StartLiteral))
plhTMReview.Controls.Add(Literal(EndLiteral))
EndLiteral = "</td> </tr>"
plhTMRequest.Controls.Add(Literal(EndLiteral))
=====================
I have been working on creating a dynamic table with controls on a
ASP.NET webpage and i have been using literal controls to do that. The
issue that i am facing is, when i have the Start and End tag as 2
different literal controls, they do not seem to form a part of my
table. Below is the example.
'This code works fine.
================
Dim StartLiteral As String, EndLiteral As String
Function Literal(ByVal HTMLCode As String)
Dim litCode As New Literal
litCode.Text = HTMLCode
Literal = litCode
End Function
StartLiteral = "<tr> <td align=""center"" bgcolor=""#ffffff""
colspan=""2""> <font face=""Verdana, Arial, Helvetica"">Test Info"
EndLiteral = "</font> </td> </tr>"
plhTMReview.Controls.Add(Literal(StartLiteral))
plhTMReview.Controls.Add(Literal(EndLiteral))
=================
'But this code doesnt.
====================
StartLiteral = "<tr> <td align=""center"" bgcolor=""#ffffff""
colspan=""2"">"
plhTMRequest.Controls.Add(Literal(StartLiteral))
StartLiteral = "<font face=""Verdana, Arial, Helvetica"">Test Info"
EndLiteral = "</font> <br>"
plhTMReview.Controls.Add(Literal(StartLiteral))
plhTMReview.Controls.Add(Literal(EndLiteral))
EndLiteral = "</td> </tr>"
plhTMRequest.Controls.Add(Literal(EndLiteral))
=====================