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 2030 http://www.codingforums.com/archive/...p?t-51849.html
"jp2code" <poojo.com/mailwrote in message news:%2******** **********@TK2M SFTNGP03.phx.gb l...
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("textMess age"), vbCrLf, "<br />")
That's a *lot* nicer!
Thanks.
"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13******** *****@corp.supe rnews.com...
http://www.codingforums.com/archive/...p?t-51849.html
"jp2code" <poojo.com/mailwrote in message
news:%2******** **********@TK2M SFTNGP03.phx.gb l...
>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["textMessag e"];
input = input.Replace(E nvironment.NewL ine, "<br />");
--
Mike Brind
"jp2code" <poojo.com/mailwrote in message
news:%2******** **********@TK2M SFTNGP03.phx.gb l...
Amazing!
Replace(Request .Form("textMess age"), vbCrLf, "<br />")
That's a *lot* nicer!
Thanks.
"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13******** *****@corp.supe rnews.com...
>http://www.codingforums.com/archive/...p?t-51849.html
"jp2code" <poojo.com/mailwrote in message news:%2******* ***********@TK2 MSFTNGP03.phx.g bl...
>>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 that
question? What browsers does that apply to?
My database stores some information based on the session id, would there be
another, (better), way of doing things?
|
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 being opened with WORD. Can anyone give me a simple method, idea,
function, example, resourse, etc.... to figure out how to handle PAGE
BREAKS. I am not sure how to handle when to put the breaks in for the
report that is being created.
Any...
|
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 work just fine. We've made a
new page, error.aspx that we're going to use for our custom 404 page. If we
load/navigate directly to this page, no problem. If we get to this page via
IIS redirect (for page not found) the one control that depends on...
|
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. part of the form that creates
the report is the ability to select a specific department. it is when that
happens, that i need 2 of the 3 parts of the report footer to be
visible=false. now i've got that working but here's the real problem.
...
|
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 my country my citylist is refreshed ok. I want to be able to
then click on my city and jump to a specific page without loosing state; and
i dont know how.
Currently My change event on my city listbox does a...
| |
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 processing instruction page number help in my case?
To clarify things up, I know the content is displayed after being rendered to some XMLObjects tool. We mainly display digital content marked up in XML in our application after being rendered. ...
|
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 page..when I
hit back button on the browser all the conrols status is getting lost
(checkboxes is loosing its checked status)
I have enable viewstate for the page level using
EnableViewState="true" also all the controls have their viewstate
enabled.
|
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 language="javascript">
|
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...
|
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: 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: 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...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |