Reputation: 13592
I have an Index Action:
[HttpGet]
public ActionResult Index (bool Myparam, ...)
{
if(Myparam)
{
...
}
return View(model);
}
I use Myparam
to set some values of model but I want that the user don't see the Myparam
. At know in some pages I have RedirectToAction
with route value of Myparam=true
after return index page the URL is:
http://mysitemainurl.com/Collection/Index?Page=2&Myparam = true&RowCount=5
and I need to displayed URL will be:
http://mysitemainurl.com/Collection/Index?Page=2&RowCount=5
I prefer to handle it in Controller and if not possible in View and if not possible either the simple way to handle it client side? Does any one have any idea about it?
Upvotes: 1
Views: 477
Reputation: 1038940
You could use a POST request instead of GET. And if this is sensitive information that really should not be seen (even by determined users), then this information has nothing to do on the client side. It should be kept safe on the server.
Upvotes: 2