does this matter

  • Thread starter Graham Mattingley
  • Start date
G

Graham Mattingley

Hi ASP people,

I have a form field, that I send it a get string to another ASP page.. The
form field can be upto 500 char long, does it matter that my URL can be upto
500 char long.

ie www.blarblar.co.uk?form_field={500 chars long} or is this OK, I was just
wondering if this will cause a problem, it works ok.. just interested if
this is normal, or is there a better way of doing it..

Regards

Graham Mattingley
 
B

Bullschmidt

No matter how long the querystring is I'd suggest using
Server.URLEncode(). And here is a little more info about it that I
previously put together.


Example URL with a querystring:
http://www.mysite.com/mydir/mypg.asp?myvar1=hey&myvar2=ho

Because a variable might contain some odd characters like spaces, it's
usually a good idea to use Server.URLEncode when creating a querystring
from a variable:
<a href="http://www.mysite.com/mypage?id=<%=
Server.URLEncode(objRS("MyIDFldFromDB")) %>">objRS("MyIDFldFromDB")</a>

And in the page that is opened you can use Request.QueryString("id") to
get the value of id.

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,207
Latest member
HelenaCani

Latest Threads

Top