MVC Encrypt

MVC Encrypt is a NuGet package to encrypt/decrypt query string parameters


In the View , the original link looks like this:

<a href='@Url.Action("TestEncrypt", new {id=7, a = 1, b = "asd" })'>Test</a>
live link: Test

To encrypt, please modify to this:

<a href='@Url.ActionEnc("mySecret", "TestEncrypt", new {id=7, a = 1, b = "asd" })'>Test</a>
Do not forget @using MVCEncrypt;

livelink: Test
In the action, please add attribute MVCDecryptFilter

            [MVCDecryptFilter(secret = "mySecret")]
            public ActionResult TestEncrypt(int a, string b)
                return Content(" a is " + a + " and b is " + b);

Learn more »

Live Demo at appHarbor

Please see

See in action »

More details

Learn more »