473,503 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading textarea comtent from a form

I want users to submit text in a textarea form, and the information is submitted one
line at a time.

When they submit the form, it will go to an ASP script. How do I parse the textarea form
submission, line-by-line? What is the delimiter between the lines? Am I looking for
vbcrlf?

Thanks so much,

Toni
Jun 27 '08 #1
3 4930
"Toni" <To****@yahoo.comwrote in message
news:OQ**************@TK2MSFTNGP06.phx.gbl...
I want users to submit text in a textarea form, and the information is
submitted one
line at a time.

When they submit the form, it will go to an ASP script. How do I parse the
textarea form
submission, line-by-line? What is the delimiter between the lines? Am I
looking for
vbcrlf?
Will this help?

Dim arrTXT
Dim intTXT
Dim strTXT
strTXT = Request.Form("textarea_name")
arrTXT = Splir(strTXT,vbCrLf)
For intTXT = 0 To UBound(arrTXT)
If Trim(arrTXT(intTXT)) <"" Then
Response.Write "<li>" & arrTXT(intTXT) '... or whatever ...
End If
Next
Jun 27 '08 #2

"McKirahan" <Ne**@McKirahan.comwrote in message
news:p4******************************@comcast.com. ..
"Toni" <To****@yahoo.comwrote in message
news:OQ**************@TK2MSFTNGP06.phx.gbl...
>I want users to submit text in a textarea form, and the information is
submitted one
>line at a time.

When they submit the form, it will go to an ASP script. How do I parse
the
textarea form
>submission, line-by-line? What is the delimiter between the lines? Am I
looking for
>vbcrlf?

Will this help?

Dim arrTXT
Dim intTXT
Dim strTXT
strTXT = Request.Form("textarea_name")
arrTXT = Splir(strTXT,vbCrLf)
For intTXT = 0 To UBound(arrTXT)
If Trim(arrTXT(intTXT)) <"" Then
Response.Write "<li>" & arrTXT(intTXT) '... or whatever ...
End If
Next

Response.Write "<li>" & Server.HTMLEncode(arrTXT(intTXT)) '... or whatever
....

--
Mike Brind
Microsoft MVP - ASP/ASP.NET
Jun 27 '08 #3

"Mike Brind [MVP]" <pa*******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>
"McKirahan" <Ne**@McKirahan.comwrote in message
news:p4******************************@comcast.com. ..
"Toni" <To****@yahoo.comwrote in message
news:OQ**************@TK2MSFTNGP06.phx.gbl...
I want users to submit text in a textarea form, and the information is
submitted one
line at a time.

When they submit the form, it will go to an ASP script. How do I parse
the
textarea form
submission, line-by-line? What is the delimiter between the lines? Am I
looking for
vbcrlf?
Will this help?

Dim arrTXT
Dim intTXT
Dim strTXT
strTXT = Request.Form("textarea_name")
arrTXT = Splir(strTXT,vbCrLf)
For intTXT = 0 To UBound(arrTXT)
If Trim(arrTXT(intTXT)) <"" Then
Response.Write "<li>" & arrTXT(intTXT) '... or whatever ...
End If
Next

Response.Write "<li>" & Server.HTMLEncode(arrTXT(intTXT)) '... or whatever
...

--
Mike Brind
Microsoft MVP - ASP/ASP.NET
EXACTLY what I need (well, except Splir = Split). THANKS to both of you!!!


Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
8436
by: Matt Daleo | last post by:
I'm attempting to read a remote file and parse it for data. The problem I'm having is that the file seems to be generated by Perl (http://alert.dot.pima.gov/scripts/1brpssd.pl) and when I read it...
3
6171
by: Gadrin77 | last post by:
I noticed when displaying the contents of a CDATA node inside a TEXTAREA using MSXML and XSL, I get an extra space before the data. at first I thought I hadn't "tightened up" the XSL, but then...
4
16662
by: Csaba Gabor | last post by:
What I'd like to do is to be able to set the font of a textarea element to the same font that another element is using (say, for example, an <INPUT type=text ...> element, but if that's a no go,...
1
3543
by: Volt | last post by:
is there any way to select and mark part of text in textarea by regular expression? i need to select the first string in textarea whitch is like xxxxx,xxx where x is any character
23
1969
by: shank | last post by:
I have the below code found on an ASP site. <% arrName = Split(Request("TextArea"),",") %> <% For i = LBound(arrName) To UBound(arrName) Response.Write "ID: " & arrName(i) & "<br>" Next %>
6
19950
by: HaggMan | last post by:
I'm creating a page that: - accepts user input in whatever language - saves that input to a file - reads the file and displays the original input The following code successfully writes the user...
16
2769
by: Jen | last post by:
Hi. I have this problem that I think should be easy but have been struggling with this for days. I have a list based on a recordset from a database. This list consists of records meeting a certain...
2
2860
by: dennis.sprengers | last post by:
Ik ben bezig met een eigen UBB editor. Als iemand aan het typen is, zorgt CTRL-B voor een \-tag en nogmaals CTRL-B voor een \ tag. Als je eerst een selectie maakt en dan CTRL-B drukt, wordt de...
3
5621
by: FunkHouse9 | last post by:
I'm working on a form to collect data in a textarea which and am trying to keep returns and spaces. I have a couple of functions that I Frankensteined together to replace returns with <br> and to...
0
7205
marktang
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,...
0
7093
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...
0
7287
Oralloy
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,...
0
7348
jinu1996
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...
0
5592
agi2029
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,...
0
4685
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...
0
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1519
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 ...
0
397
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.