473,657 Members | 2,395 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 4938
"Toni" <To****@yahoo.c omwrote in message
news:OQ******** ******@TK2MSFTN GP06.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("t extarea_name")
arrTXT = Splir(strTXT,vb CrLf)
For intTXT = 0 To UBound(arrTXT)
If Trim(arrTXT(int TXT)) <"" 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.c omwrote in message
news:OQ******** ******@TK2MSFTN GP06.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("t extarea_name")
arrTXT = Splir(strTXT,vb CrLf)
For intTXT = 0 To UBound(arrTXT)
If Trim(arrTXT(int TXT)) <"" Then
Response.Write "<li>" & arrTXT(intTXT) '... or whatever ...
End If
Next

Response.Write "<li>" & Server.HTMLEnco de(arrTXT(intTX T)) '... or whatever
....

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

"Mike Brind [MVP]" <pa*******@hotm ail.comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>
"McKirahan" <Ne**@McKirahan .comwrote in message
news:p4******** *************** *******@comcast .com...
"Toni" <To****@yahoo.c omwrote in message
news:OQ******** ******@TK2MSFTN GP06.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("t extarea_name")
arrTXT = Splir(strTXT,vb CrLf)
For intTXT = 0 To UBound(arrTXT)
If Trim(arrTXT(int TXT)) <"" Then
Response.Write "<li>" & arrTXT(intTXT) '... or whatever ...
End If
Next

Response.Write "<li>" & Server.HTMLEnco de(arrTXT(intTX T)) '... 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
8451
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 the script-generated data is not displayed. When I view the page with a browser the data is displayed just fine. I've tried using the built-in PHP commands to read the file (file, fget) as well as the all of the Snoopy "fetch" classes...
3
6176
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 even when I did this... <textarea rows="24" cols="80"><xsl:value-of select="/Root/Child/Data"/></textarea>
4
16688
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, then a generic element's font will do OK, too. What's the correct way to do this, please (so that it will also work for IE 6)? The motivation for this is that I have some text on the screen and I want to insert a textarea element between the...
1
3555
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
1982
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
20001
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 input to a file (when I open the file, it's in the correct font), but I can't get PHP to read the file and display the correct characters. HTML --------------- Form
16
2792
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 criteria and at the bottom of this list i have a button that inserts all these records to a´nother table in the database. So long everything's ok. BUT, at the top of this list I have a textarea that the user can write down some text to be put...
2
2881
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 selectie ingesloten door \ en \, net als hier op GoT. Wat ik nu probeer is, om de B-knop uit de toolbar te laten oplichten als de cursor op een woord staat dat omgeven is door B-tags: I'm trying to write my own UBB editor. If a user types...
3
5632
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 replace spaces with &nbsp;. The <br> part works well enough, but I keep getting "%20" instead of "&nbsp;" for the spaces. I understand that escape() changes " " to "%20", but I would think the ConvertSpaces function below would change the %20 to...
0
8394
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, 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...
0
8825
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, 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...
0
8732
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 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...
0
8605
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7327
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, 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...
0
5632
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();...
0
4152
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...
1
2726
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
2
1615
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 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...

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.