Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Amir Khan 1287 posts 2744 karma points
    Feb 05, 2014 @ 23:49
    Amir Khan
    0

    Pass complex link via querystring

    Hi, I'm trying to pass a complex querystring to razor to be rendered in a template. The string contains tons of paramaturs, url id and several paramaters separated by an "&". The query string stops being read after the first "&" is there a way to pass the entire string through?

     

    I'm reading the query string like this: var filingLink = Request.QueryString["filingLink"];

    And the string looks something like this (truncated a bit for brevity): http://domain.com/filings/text.data?id=54321&vid=longstringoftext=&compId=12345

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Feb 06, 2014 @ 01:27
    Chriztian Steinmeier
    2

    Hi Amir,

    When you do this:

    var filingLink = Request.QueryString["filingLink"];
    

    you're asking for the value of the filingLink parameter in the QueryString.

    To get the full querystring, use the server variable QUERY_STRING, like this:

    var querystring = Request.ServerVariables["QUERY_STRING"];
    

    Hope that helps,

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft