Start and End HTML Tags as 2 different Literal controls.

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))
=====================
 

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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top