URL Truncation

  • 18 years ago

    Hi all,


    I have a string which stores a URL. I then use:


    Code:

    URL myURL = new URL(myString);


    When I investigate this newly created URL object, the address is truncated and hence doesn't work properly.


    Any ideas?

  • 18 years ago

    What is "mystring" and how does it look when it's truncated?


    could you describe further?



    - Mike H

  • 18 years ago

    Just a quicky, I noticed we seem to be the most common posters in
    the Java section. cool.






    - Mike H

  • 18 years ago

    That string is massive, it's actually passing the address of an ASP page and the QueryString is heading towards 2000 chars long, maybe that's why it's getting truncated!!


    Any ideas?!

  • 18 years ago

    that's probably it.





    - Mike H

  • 18 years ago

    okk simple answer is to split the string, then pass it through the part that is truncating it, then reassemble just before the url is activated.

  • 18 years ago

    It's the URL class that's truncating it and you can't change the fields of an object of the URL class (as there is no setURL method).


    You can't redirect to a webpage unless you use the URL class, but thanks for the idea.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.” - Dennis Ritchie