Copied to clipboard

Flag this post as spam?

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


  • Dafydd Owen 33 posts 173 karma points
    May 22, 2014 @ 16:33
    Dafydd Owen
    0

    Razor values lost with QueryString Encryption

    Hi All,

    I hope you can help me.

    I have been using this HttpModule > http://madskristensen.net/post/httpmodule-for-query-string-encryption to encrypt the querystring values that I need passed from page to page. 

    The module itself is correctly encrypting the querystring but the return value is not correct, it returns the exact same string that was encrypted and not the dynamic values. 

    My QueryString values need to be dynamically added so my encrypted QueryString looks like this

    string query = QueryStringModule.Encrypt("date=@date&title=@title&location=@location&days=@days&places=@places&price=@price");

    The return value is never the value but the actual string itself. So instead of retrieving a date value such as  01/07/2014, all I see is @date when I request the QueryString.

    Can anyone offer any insight as to why this is happening and how I might be able to resolve it?

    Thanks

  • Dafydd Owen 33 posts 173 karma points
    May 22, 2014 @ 16:57
    Dafydd Owen
    100

    Scrap that. I was overcomplicating the issue. 

    The encryption module automatically encrypts the querystring and does not require the code listed above.

    Using regular querystrings works.

    :)

Please Sign in or register to post replies

Write your reply to:

Draft