473,394 Members | 1,812 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,394 software developers and data experts.

Show HTML String

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 it to this page just to show this HTML
string. I know that in some cases we can use .InnerHtml property of some
controls to inject the HTML string created in C# code, but it didn't work in
my case. I tried to use TEXTAREA1.InnerHtml and it shows me the HTML string
instead of formatted string. What's wrong?

Just D.
Jul 29 '06 #1
3 2859
are you trying to display html tags as string literals which are created from
the server side? or are you trying to render html tags generated from the
server?

ie. do you want "<table><tr>..." shown up to the user or do you want an
actual table?

for an actual table which gets created from server side code you can use
literalcontrol class (i think that is right anyway).

if you want string literal of html tags I think you have to look up escape
ascii codes for that ( i think). i also think some controls have an option to
not render as HTML.

If by chance what you are wanting is more basic say have HTML tags inside a
aspx page all you need to do is make sure <html<bodyetc are not in the
HTML you are intrested in displaying.

So for example if you have a HTML page already just copy everything past
<bodyor <formbasically all ASPX content is rendered inside a form tag so
no form inside a form if that makes sense.

"Just D." wrote:
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 it to this page just to show this HTML
string. I know that in some cases we can use .InnerHtml property of some
controls to inject the HTML string created in C# code, but it didn't work in
my case. I tried to use TEXTAREA1.InnerHtml and it shows me the HTML string
instead of formatted string. What's wrong?

Just D.
Jul 29 '06 #2
On Fri, 28 Jul 2006 20:54:56 -0700, "Just D." <no@spam.pleasewrote:
>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 it to this page just to show this HTML
string. I know that in some cases we can use .InnerHtml property of some
controls to inject the HTML string created in C# code, but it didn't work in
my case. I tried to use TEXTAREA1.InnerHtml and it shows me the HTML string
instead of formatted string. What's wrong?

Just D.
I'd suggest using the text property of the Label control
Peter Kellner
http://peterkellner.net
Jul 29 '06 #3
if you do <br/on the .text value of a textbox control it does not render
display as <br/but rather gives a new line.

So it does depend on what he means when he says html if you follow what I am
saying.

"PeterKellner" wrote:
On Fri, 28 Jul 2006 20:54:56 -0700, "Just D." <no@spam.pleasewrote:
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 it to this page just to show this HTML
string. I know that in some cases we can use .InnerHtml property of some
controls to inject the HTML string created in C# code, but it didn't work in
my case. I tried to use TEXTAREA1.InnerHtml and it shows me the HTML string
instead of formatted string. What's wrong?

Just D.

I'd suggest using the text property of the Label control
Peter Kellner
http://peterkellner.net
Jul 29 '06 #4

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

Similar topics

5
by: Al Davis | last post by:
Note: I tried cross-posting this message to several newsgoups, including comp.lang.perl.misc, c.l.p.moderated, comp.infosystems.www.authoring.cgi, comp.lang.javascript and comp.lang.php. Nothing...
10
by: oLE | last post by:
I would like to add some javascript to show/hide a certain row of a table. The first row of the table contain the hyperlink that calls the javascript the second row is the one i want to show/hide...
3
by: Sam | last post by:
I wrote a script to show or hide items in an HTML list (<ul id="stuff">) depending on whether a list-item's CLASS attribute matches an input string (catString), which is chosen from a SELECT menu....
8
by: ALESSANDRO Baraldi | last post by:
Hi and good evening. I need to show with Lebans RichTextBox a Mime decoded Message. I build an Mail Receiver, with MIME conversion. To show Html Message i think that it's need to rtf...
3
by: Ipsita | last post by:
Hi, I am explaining the scenario of what I am trying to do: - I have a webform with some controls, from which I am taking the data. eg say Username, password - I am passing these data as...
17
by: alxasa | last post by:
Hi, can someone please show me how to most elegently do this?..... I have a textbox, and I want to search the contents of it and replace all instances of a certain word, and replace that word...
3
by: sezanawa | last post by:
Hi Guys, I have a problem with JOptionpan. I m using JOption pane for showing messages or even Exceptions etc. But it does not poped up on TOP. Its always behind parent windows. I think i...
1
by: prathna | last post by:
Hi .. I have a logic:iterate tag which will display 5 rows each row with a drop downlist and 2 textfields.now by default all the rows will be shown.how do i hide all the rows except the first...
5
by: question.boy | last post by:
I am trying to control the visibility of a set of div based on selected values but can't seem to get it right. Below is what I have so far but it does not work at all. The basic concept was to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.