Hi all,
I wonder if C# has a build-in utility to convert special characters
(for example "&", "<", ">") to the corresponding html entities. If
such a utility is not available, can someone tell me what to do best
to make the conversion (regular expressions?).
Thanx in advance,
Frederik 5 16131
Hi,
Is System.Web.HttpUtility.HtmlEncode() what you are looking for?
"Frederik" <ae************@hotmail.com> wrote in message
news:97**************************@posting.google.c om...
Hi all,
I wonder if C# has a build-in utility to convert special characters
(for example "&", "<", ">") to the corresponding html entities. If
such a utility is not available, can someone tell me what to do best
to make the conversion (regular expressions?).
Thanx in advance,
Frederik
> Is System.Web.HttpUtility.HtmlEncode() what you are looking for?
Hi Shiva,
That method seems to be useful, but I can't use it!!! The namespace can't be
found when compiling. Any idea why? I'm using Visual Studio 2003 and I'm
working on a Win32 application.
Regards,
Frederik Hi all, I wonder if C# has a build-in utility to convert special characters (for example "&", "<", ">") to the corresponding html entities. If such a utility is not available, can someone tell me what to do best to make the conversion (regular expressions?). Thanx in advance, Frederik
Add a reference to the System.Web assembly.
(Right-click on References in Solution Explorer and select Add Reference.)
- Magnus
"Frederik" <ae************@hotmail.com> wrote in message
news:eK**************@TK2MSFTNGP12.phx.gbl... Is System.Web.HttpUtility.HtmlEncode() what you are looking for? Hi Shiva,
That method seems to be useful, but I can't use it!!! The namespace can't
be found when compiling. Any idea why? I'm using Visual Studio 2003 and I'm working on a Win32 application.
Regards, Frederik
Hi all, I wonder if C# has a build-in utility to convert special characters (for example "&", "<", ">") to the corresponding html entities. If such a utility is not available, can someone tell me what to do best to make the conversion (regular expressions?). Thanx in advance, Frederik
Yes, as Magnus suggested, add a reference to System.Web.dll.
"Frederik" <ae************@hotmail.com> wrote in message
news:eK**************@TK2MSFTNGP12.phx.gbl... Is System.Web.HttpUtility.HtmlEncode() what you are looking for?
Hi Shiva,
That method seems to be useful, but I can't use it!!! The namespace can't be
found when compiling. Any idea why? I'm using Visual Studio 2003 and I'm
working on a Win32 application.
Regards,
Frederik
Hi all, I wonder if C# has a build-in utility to convert special characters (for example "&", "<", ">") to the corresponding html entities. If such a utility is not available, can someone tell me what to do best to make the conversion (regular expressions?). Thanx in advance, Frederik
> Add a reference to the System.Web assembly. (Right-click on References in Solution Explorer and select Add Reference.)
Yes, as Magnus suggested, add a reference to System.Web.dll.
Thanx Magnus and Shiva! It runs fine now! :-)) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Roy W. Andersen |
last post by:
I've been searching google about this for days but can't find anything,
so I'm hoping someone here can help me out.
I'm trying to create zip-files without needing the zip-file extension in
PHP,...
|
by: Ricardo Quintanilla |
last post by:
i have a code that sends data to a socket listening over as400 platform,
the socket responds to me as a "byte array".
then i need to convert the "byte array" into a string.
the problem is that...
|
by: Kueishiong Tu |
last post by:
How do I convert a managed String type to a native char
type? If nothing is availbale, how do I copy the the
contents of the String object to a char array?
|
by: BADEV |
last post by:
I've an multi-line edit box on an html page that I use to
collect detailed description information. I'd also like
to display that information on an html page... How do I
convert it to hmtl so...
|
by: Paw Pedersen |
last post by:
When using Encoding.Convert to convert from UTF-8 to ISO646-US the special
Chars like ÆØÅ are replaced with a questionmark (?).
Is there any other way to convert between encodings where you can set...
| |
by: Robert Dodier |
last post by:
Hello,
Sorry for asking what must be a FAQ, but I wasn't able to find the
answer.
I have an XML document fragment which I want to store as a text string.
I want a function to convert any XML...
|
by: KevinADC |
last post by:
Purpose
The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class....
|
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: neovantage |
last post by:
hey geeks,
I am using a function which convert unicode to entities. So that i can save values into mysql database into entities. This function really helps me when i display the store entity data...
|
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...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |