Wrox Programmer Forums
|
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
 
Old June 23rd, 2004, 11:27 PM
Authorized User
 
Join Date: Apr 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!
 
Old June 23rd, 2004, 11:53 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

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, "")
 
Old June 24th, 2004, 12:05 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

You can use trim() methode to trencate all the spaces

Love 4 all
 
Old June 24th, 2004, 01:56 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.
 
Old June 24th, 2004, 02:36 AM
Authorized User
 
Join Date: Apr 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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!

 
Old June 24th, 2004, 02:47 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.
 
Old June 24th, 2004, 03:47 AM
Authorized User
 
Join Date: Apr 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking for a Carriage return darkhalf Classic ASP Databases 2 November 5th, 2007 06:15 AM
insert carriage return darkhalf Javascript 0 April 10th, 2007 02:42 PM
about carriage return... edu1980 XSLT 1 July 5th, 2006 04:11 AM
New Line/Carriage Return interrupt Javascript How-To 7 October 3rd, 2004 06:27 AM
HELP Inserting Carriage Return orangem Classic ASP Databases 8 July 5th, 2004 08:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.