I have a code library that I developed in ASP.Net. The code displays in a
web form via a System.Web.UI.WebControls.Label.
It works well because I can search for code snippets and then highlight the
searched results by wrapping color tags around them much like the result
google provides when you search.
However, I tried to save the function I used to perform that action, and it
has characters such as "<", "/" and ">", and the control doesn't display
them. I suppose it's interpreting them as html and applying them to the html
control.
How do I display markup characters in a web control? Is there some sort of
delimiter? I know next to nothing about html.
thanks 2 1128
"Tim Zych" <tz*************@earthNOSPAMlink.net> wrote in
news:uT**************@TK2MSFTNGP11.phx.gbl: I have a code library that I developed in ASP.Net. The code displays in a web form via a System.Web.UI.WebControls.Label.
It works well because I can search for code snippets and then highlight the searched results by wrapping color tags around them much like the result google provides when you search.
However, I tried to save the function I used to perform that action, and it has characters such as "<", "/" and ">", and the control doesn't display them. I suppose it's interpreting them as html and applying them to the html control.
How do I display markup characters in a web control? Is there some sort of delimiter? I know next to nothing about html.
Tim,
Use HttpUtility.HtmlEncode to convert characters like "<", "/" and
">" to their "displayable" equivalents (< for <, > for >, etc.)
--
Hope this helps.
Chris.
-------------
C.R. Timmons Consulting, Inc. http://www.crtimmonsinc.com/
thanks!
"Chris R. Timmons" <crtimmons@X_NOSPAM_Xcrtimmonsinc.com> wrote in message
news:Xn**********************************@207.46.2 48.16... "Tim Zych" <tz*************@earthNOSPAMlink.net> wrote in news:uT**************@TK2MSFTNGP11.phx.gbl:
I have a code library that I developed in ASP.Net. The code displays in a web form via a System.Web.UI.WebControls.Label.
It works well because I can search for code snippets and then highlight the searched results by wrapping color tags around them much like the result google provides when you search.
However, I tried to save the function I used to perform that action, and it has characters such as "<", "/" and ">", and the control doesn't display them. I suppose it's interpreting them as html and applying them to the html control.
How do I display markup characters in a web control? Is there some sort of delimiter? I know next to nothing about html.
Tim,
Use HttpUtility.HtmlEncode to convert characters like "<", "/" and ">" to their "displayable" equivalents (< for <, > for >, etc.)
-- Hope this helps.
Chris. ------------- C.R. Timmons Consulting, Inc. http://www.crtimmonsinc.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: YoBro |
last post by:
Hi
I have used some of this code from the PHP manual, but I am bloody hopeless
with regular expressions.
Was hoping somebody could offer a hand.
The output of this will put the name of a form...
|
by: Don |
last post by:
Using PHP, I'm creating an <input> tag. How do you delimit the text string for the value parm of an
<input> tag, when the string contains the delimit char?
Example: <input...value="This text...
|
by: Mel |
last post by:
Are we going backwards ? (please excuse my spelling...)
In my opinion an absolute YES !
Take a look at what we are doing ! we create TAGS, things like <H1> etc.
and although there are tools...
|
by: Robert Bowen |
last post by:
Hello peeplez. I have an odd problem. When I put the ANSI symbol for
"less than" ("<"), the word STRONG and then the ANSI symbol for
"greater than" (">") in my web page, followed by some text, then...
|
by: toby989 |
last post by:
Hi All
Sorry for reposting...the entries of the post from 11/23/2005 by Eric
Lindsay have been removed from the server already and I am seeing only
the header.
So, I have the problem of...
|
by: matt |
last post by:
hello,
im doing my first experiment w/ RSS & ASP.NET. could use a bit of help.
i have a livejournal site blog here:
http://nexus9.livejournal.com/
and i have its RSS xml here:
|
by: prt7u |
last post by:
Howdy,
I've started back afte a very long time of working with web pages for
an organization that I am affiliated with (personally not
professionally). Seeing that technology has advanced a lot...
|
by: Number 11950 - GPEMC! Replace number with 11950 |
last post by:
HTML to RTF conversion is done by the clipboard in certain circumstances.
Does anyone know of an API or possibly a Framework2 class.method that will
convert HTML to RTF...?
TIA
--
Timothy...
|
by: annalisa |
last post by:
I really need some help with langauge conversion to HTML. My
translators are translating into Word and I need to convert Word to
HTML. It's been awhile since I've worked with Unicode and know that...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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: 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,...
|
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...
|
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...
| |