I'm transitioning from ASP development, please excuse
these basic questions. One thing I did often in ASP was
create a "translate" function to render one string to
another, strip out excess carriage returns, etc.
I want to do the same thing in ASP.NET. I have a mail
component that will accept HTML, but it requires all HTML
to be listed on a single line. It takes the syntax:
msgObj.BodyPart s.Add(" <html markup here> "),
BodyPartFormat. HTML)
Can someone point me to how I might translate a string
with carriage returns/newlines into a single unbroken
line? How about if I wanted to translate one character to
another?
Best would be if ASP.NET would actually visit a live page
on the web, strip out the HTML it needs, and embed it in
the string above as a single line.
Thanks in advance for any pointers or resources you might
be able to provide.
-KF 1 2532
I bet your mail component will accept a variable which contains carriage
returns.
But you should look at the methods of the System.String class. In
particular,
Dim x as String = "something with CR and/or LF in it"
Dim stripped as String = x.Replace(Contr olChars.vbCr, "
").Replace(Cont rolChars.vbLf, " ")
Note I'm replacing with a space, so that "A<CrLf>B" doesn't become "AB".
--
John Saunders
Internet Engineer jo***********@s urfcontrol.com
"kennethfin e" <ke*********@ho tmail.com> wrote in message
news:06******** *************** *****@phx.gbl.. . I'm transitioning from ASP development, please excuse these basic questions. One thing I did often in ASP was create a "translate" function to render one string to another, strip out excess carriage returns, etc.
I want to do the same thing in ASP.NET. I have a mail component that will accept HTML, but it requires all HTML to be listed on a single line. It takes the syntax:
msgObj.BodyPart s.Add(" <html markup here> "), BodyPartFormat. HTML)
Can someone point me to how I might translate a string with carriage returns/newlines into a single unbroken line? How about if I wanted to translate one character to another?
Best would be if ASP.NET would actually visit a live page on the web, strip out the HTML it needs, and embed it in the string above as a single line.
Thanks in advance for any pointers or resources you might be able to provide.
-KF This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David Furey |
last post by:
Hi
I have an XML documnet and a XSLT document as shown below
THe XSLT document brings back a filtered docmument that has the VendorName
that starts with a particular sub-string
This works as expected with alphabet and number characters and the ' (single
quote ' entity) character but does not work if a double quote character
" is part of the string to filter on
This returns all Vendor Names that begin with A (either case)
|
by: alex.mcshane |
last post by:
Hi - I would be grateful for any advice on the following.
Within DB2 for OS/390, the STRIP Scaler Function is available.
Its function is, for example, to remove leading zeros from a string.
For example: -
Strip(Char(Digits(v_cntrct_no_seed)),L,'0')
- v_cntrct_no_seed is defined as Integer
- Char and Digits return a character representation of a number with
|
by: Steven |
last post by:
Can anyone tell me how to toggle the "Caps Lock" key?
Thanks in advance
|
by: Steven Bethard |
last post by:
Ok, I finally have a PEP number. Here's the most updated version of the
"make" statement PEP. I'll be posting it shortly to python-dev.
Thanks again for the previous discussion and suggestions!
PEP: 359
Title: The "make" Statement
Version: $Revision: 45366 $
Last-Modified: $Date: 2006-04-13 07:36:24 -0600 (Thu, 13 Apr 2006) $
|
by: Arne |
last post by:
A lot of Firefox users I know, says they have problems with validation
where the ampersand sign has to be written as & to be valid. I don't
have Firefox my self and don't wont to install it only because of this,
so I hope some of you gurus can enlighten me with this :)
In what circumstances can the "&" in the source code be involuntary
changed to "&" by a browser when or other software, when editing and
uploading the file to the web...
| |
by: Ulysse |
last post by:
Hello,
I need to clean the string like this :
string =
"""
bonne mentalité mec!:) \n <br>bon pour
info moi je suis un serial posteur arceleur dictateur ^^*
\n <br>mais pour avoir des resultats probant il
faut pas faire les mariolles, comme le "fondateur" de bvs
|
by: pbmods |
last post by:
AN INTRODUCTION TO FUNCTION OBJECTS
LEVEL: INTERMEDIATE
PREREQS: OBJECTS
You've seen it before. You're setting up an XMLHttpRequest call, and you need to execute a function when it returns, so you do something like this:
http.onreadystatechange = myAwesomeFunction;
|
by: Jon Slaughter |
last post by:
is there any way to simply add an attribute like feature to a
function/method definition?
say I create a function like
function Test()
{
//....
}
|
by: Peter |
last post by:
Hi
I write a POS (point-of-sale) applic. until now i use c# code to open
the cash-drawer.
But now there is a new hardware and i have just a c++ code snip to do
this.
Please can somebody help me to translate this:
#include <windows.h>
// szDeviceName ->Device Driver Name
|
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 we have to send another system
| |
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...
| | |