473,378 Members | 1,475 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Start and End HTML Tags as 2 different Literal controls.

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))
=====================
Sep 10 '08 #1
0 979

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Donald Firesmith | last post by:
Are html tags allowed within meta tags? Specifically, if I have html tags within a <definition> tag within XML, can I use the definition as the content within the <meta content="description> tag? ...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
15
by: Craig Hunt | last post by:
I posted this in another newsgroup, so please forgive me if you've already seen it. --- Am I missing something here? Quite frequently, I'll write an aspx document taking care to format the...
4
by: Ganesh Muthuvelu | last post by:
Hello, I was wondering if there is a way to store all the HTML element information in a database and then dynamically generate the HTML code for a page?.. Basically, I do not want to design every...
3
by: Just D. | last post by:
All, What's the simplest way to show my own HTML string on the ASPX page assuming that this page is just created using the wizard and it has nothing on it? We're free to use any control adding...
2
by: _MC_ | last post by:
Hi, i want to structure two elements (each conists of 1 Label and 1 Textbox) in an Table. As I use an Content Place Holder, i thought it is possible to add the table via Controls.add(Literal)....
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
4
by: Andy Fish | last post by:
hi, this is more an html parsing question than an XML question but I think it's the kind of thing that folks in an XML newsgroup would be more likely to help with, so please excuse me if it's a...
1
by: Hetal | last post by:
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.