 |
| Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

June 23rd, 2004, 11:27 PM
|
|
Authorized User
|
|
Join Date: Apr 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Line Break/Carriage Return in URL
Hi there! Does anybody here know how to encode a line break/carriage return in URL? Is this possible?
Thanks!
|
|

June 23rd, 2004, 11:53 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
But, I think you cannot include a linebreak in a URL. Are you trying to pass a long string through a querystring ? If then you may try post method instead of get method.
You may replace carriage return with numm string as below.
replace(url, vbcrlf, "")
|
|

June 24th, 2004, 12:05 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You can use trim() methode to trencate all the spaces
Love 4 all
|
|

June 24th, 2004, 01:56 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi lian_a,
I have seen a couple of your posts dealing with sending stuff through the QueryString.
Are you aware that you can also send information in the body of an HTTP request, using POST as the mechanism? When you do that, you won't be troubled by some of the limitations of the URL QueryString (like the size).
Just a thought. Of course you could have very valid reasons for using the QueryString exclusively, but I just wondered.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

June 24th, 2004, 02:36 AM
|
|
Authorized User
|
|
Join Date: Apr 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Actually...I need to pass a URL which will be used by another system. So the values in my text area must be appended to the url. I know that this may be risky but this is how the system works. I'm using the WinHTTPRequest object to see if the URL is correct or not. So is there a way to append a line break in the URL? If a white space is encoded as "%27", is there also a code for a line break? Thanks!
|
|

June 24th, 2004, 02:47 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Why don't you try it out?
Create a very simple form that uses GET as the method. Add a textarea, add a submit button, view the page in your browser, type some stuff and hit the submit button.
I think the browser will pass an encoded linebreak/carriage return sequence.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

June 24th, 2004, 03:47 AM
|
|
Authorized User
|
|
Join Date: Apr 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I did that but then the line breaks aren't displayed in the receiving system. Anyway, thanks to all those who replied. I just found out that the line breaks aren't needed anymore.
|
|
 |