Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 397
  • Last Modified:

How to encode a hyper link string

Hi,
  I ahve tried to encode a hyperlink to get rid of spaces passed through ina querystring. however I keep getting errors saying that "URLEncode" is either a misplaced package name or a non-existent entity.

Can you give me an example of how my encoding should work?

my test is as follows java.net.URLEncode.encode("my test d data");
0
seoirse
Asked:
seoirse
1 Solution
 
CEHJCommented:
java.net.URLEncoder.encode("my test d data");
0
 
xxMariusxxCommented:
heheh...Typo.  You're just missing the 'r';-)  

java.net.URLEncode'r'.encode("my test d data");

Don't worry...happens to the best of us! :-)

Marius
0
 
seoirseAuthor Commented:
cheers for teh help guys. both of you were correct
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now