AS:URL Truncated

Discussion in 'C#' started by Leo595, Feb 10, 2007.

  1. #1
    I have a page that creates dynamic hyperlinks for each recorded displayed. Many of the constructed URLs exceed 128 characters. Those that with greater than 128 are truncated for some reason unknown to me. I know that IE supports URLs up to 2048 characters. Is there a way for me to create and use longer URLs in my ASP dynamic links?

    Example:
    This code:
    response.write "<a href=""somepage.asp?a=1234567890&b=1234567890&c=1234567890&d=1234567890&e=1234567890&f=1234567890&g=1234567890&h=1234567890&i=1234567890&j=1234567890&k=1234567890&l=1234567890&m=1234567890"">asdf</a>"

    Creates a url that appears like this:

    http://localhost/pages/somepage.asp?a=1234567890&b=1234567890&c=1234567890&d=1234567890&e=1234567890&f=1234567890&g=1234567890&
     
    Leo595, Feb 10, 2007 IP
  2. TasteOfPower

    TasteOfPower Peon

    Messages:
    572
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    use post not get
     
    TasteOfPower, Feb 11, 2007 IP
  3. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Exactly, You'll see that ASP.NET's Viewstate hidden posted elements can get HUGE! I'm talking thousands of characters. It's also safer to pass around posted values.
     
    ccoonen, Feb 12, 2007 IP