473,788 Members | 2,787 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Inner Html and it shows me the HTML string
instead of formatted string. What's wrong?

Just D.
Jul 29 '06 #1
3 2884
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 <formbasicall y 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.Inner Html 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.please 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.Inner Html 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.

"PeterKelln er" wrote:
On Fri, 28 Jul 2006 20:54:56 -0700, "Just D." <no@spam.please 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.Inner Html 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
3483
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 appeared on my news server, so I'm trying again - this time posting a separate copy of the message to each group. I'm thinking this should be fairly easy to accomplish - a quick and dirty ... what? ... script? program?
10
4660
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 with the javascript in a toggle fashion. the problem is a know very little javascript and have become incredibly frustrated because i went ahead thinking it was going to be like C. its not. I know i can use these lines to do the actual work:
3
2867
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. Can anyone suggest any improvements to this (below)? I'm a JS beginner. It seems to work Camino/Firefox and Mac Explorer-5, but not in Safari. I haven't been able to test it in
8
2874
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 tranlation HTML--->RTF Any one have suggestion for this or some code that show how to...? Thanks for any idea.
3
3988
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 parameters to the web service method result = serviceproxy.VerifyUser(username, password) on the event of the "Submit" button_click. - The webservice webmethod uses the username, password to verify if the user is valid user. If no, it sends an error...
17
8135
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 with something else. For the purposes of this it could be replacing "green" with "blue". Can someone please show me how to properly do this? :) Sincerest regards, Alxasa.
3
5219
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 need to specifiy JOptionpane to display on TOP of all windows or dialogs. But how should i do? i really dont know. Can any one tell me how it works. I past my code below. import java.io.FilenameFilter;
1
2371
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 one.i know how to show/hide a row when its not dynamic.but i dont know how to do it when its logic iterate tag. <logic:iterate indexId="index" id="phoneItem" name="nameForm" property="results"> <% String dropdownType = "results.dropdownType";...
5
2973
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 have a set of Divs A through Z and by click the associated text character that Div would be visible and all others would be hidden. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10173
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.