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 1199 posts 2567 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 2726 posts 8320 karma points MVP 4x 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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies