When I collect the text from a form's text box, I am loosing the page
breaks.
When using C# in the past, I used this: -
string strLine, strParagraph;
-
StringReader sReader = new StringReader(Request.Form["textMessage"]);
-
while (sReader.Peek() -1)
-
{
-
strLine = sReader.ReadLine();
-
strParagraph += strLine;
-
if (strLine == "")
-
{
-
strParagraph += "<br/><br/>";
-
}
-
}
-
How would this be changed for VBScript using Classic ASP? StringReader is a
..NET creature, isn't it? 3 2013 http://www.codingforums.com/archive/...p?t-51849.html
"jp2code" <poojo.com/mailwrote in message news:%2******************@TK2MSFTNGP03.phx.gbl...
When I collect the text from a form's text box, I am loosing the page breaks.
When using C# in the past, I used this: -
string strLine, strParagraph;
-
StringReader sReader = new StringReader(Request.Form["textMessage"]);
-
while (sReader.Peek() -1)
-
{
-
strLine = sReader.ReadLine();
-
strParagraph += strLine;
-
if (strLine == "")
-
{
-
strParagraph += "<br/><br/>";
-
}
-
}
-
How would this be changed for VBScript using Classic ASP? StringReader is a .NET creature, isn't it?
Amazing!
Replace(Request.Form("textMessage"), vbCrLf, "<br />")
That's a *lot* nicer!
Thanks.
"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13*************@corp.supernews.com...
http://www.codingforums.com/archive/...p?t-51849.html
"jp2code" <poojo.com/mailwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
>When I collect the text from a form's text box, I am loosing the page breaks.
When using C# in the past, I used this: - string strLine, strParagraph;
- StringReader sReader = new StringReader(Request.Form["textMessage"]);
- while (sReader.Peek() -1)
- {
- strLine = sReader.ReadLine();
- strParagraph += strLine;
- if (strLine == "")
- {
- strParagraph += "<br/><br/>";
- }
- }
How would this be changed for VBScript using Classic ASP? StringReader is a .NET creature, isn't it?
Off topic, but so is this in place of your C#:
string input = Request.Form["textMessage"];
input = input.Replace(Environment.NewLine, "<br />");
--
Mike Brind
"jp2code" <poojo.com/mailwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
Amazing!
Replace(Request.Form("textMessage"), vbCrLf, "<br />")
That's a *lot* nicer!
Thanks.
"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13*************@corp.supernews.com...
>http://www.codingforums.com/archive/...p?t-51849.html
"jp2code" <poojo.com/mailwrote in message news:%2******************@TK2MSFTNGP03.phx.gbl. ..
>>When I collect the text from a form's text box, I am loosing the page breaks.
When using C# in the past, I used this: - string strLine, strParagraph;
- StringReader sReader = new StringReader(Request.Form["textMessage"]);
- while (sReader.Peek() -1)
- {
- strLine = sReader.ReadLine();
- strParagraph += strLine;
- if (strLine == "")
- {
- strParagraph += "<br/><br/>";
- }
- }
How would this be changed for VBScript using Classic ASP? StringReader is a .NET creature, isn't it? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Sims |
last post by:
Hi,
I heard that there was a chance of 'loosing' a session ID between pages,
(when the user clicks from one link to another).
Is it really possible? Where could I find a definitive answer to...
|
by: Scott |
last post by:
Was not sure if this was the place to post this or not, so if not, can
someone point me in the right direction.
Here is my problem - I have an ASP page the is generating a file with HTML
that is...
|
by: darrel |
last post by:
We have a bunch of usercontrols we are using on our site. One of them calls
functions in a compiled DLL (is that a 'resource' in VS.net terminology?)
The pages that contains all of these controls...
|
by: kaosyeti |
last post by:
hey... i have a report that groups on salespeople. the report footer is a
three part summary of the store's total data with 2 different departments for
parts 1 and 2 and a store total for part 3. ...
|
by: Owen Richardson |
last post by:
I have an asp.net website where i have a quick search facility built into my
master page. the search is a web control, with a drop down country box and a
list box full of cities.
When i select...
|
by: Jens |
last post by:
Posted to:
comp.periphs.printers
comp.lang.c
comp.lang.postscript
Hello,
I am looking for some publically available methods/algorithms or C source
code for detecting
|
by: bblue |
last post by:
hi,
I need help in implementing page breaks in XML files? any suggestion on how can this be done? do you recommend using processing instructions or add a new elements would make more sense? can the...
|
by: c_shah |
last post by:
I have a data bound repeater control; in the item template of the
repeater I have two checkbox, dropdown list and a button (ASP.net
controls). When that button is clicked it goes to another...
|
by: Falcula |
last post by:
Hello,
I have a treeview control, when i select a item i navigate to url. But
selected node is lost, it reset itself, loosing state.
I post my code here. Thanks in advance.
<script...
|
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: 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: 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: 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...
|
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: 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,...
|
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...
| |