Hi
i am using MVC 5 in Action
public ActionResult ExportPDF(string name, string MemberID, DateTime SubmitDate)
in this url this parameters value display so audting issue how to hide all parameters in url please help
i am using partialmethod there java script i am psssing parameters so please help how to hide parameter in address bar url
Anandu G NathPosted Dec 27, 2023, 3:37 AM
@Thulasiram pakala
Let's say you have a scenario where you want to pass sensitive data like an ID through the URL but you don't want it to be easily readable. You can encrypt the parameter before sending it and decrypt it on the server side.
For encryption and decryption, you can use cryptographic functions or libraries available in .NET.
Jayraj ChhayaPosted Dec 22, 2023, 5:47 AM
To hide the parameters in the address bar URL in MVC 5, you can make use of the
POSTmethod instead of theGETmethod. By default, when you submit a form in MVC, it uses theGETmethod, which appends the form data to the URL. However, you can change the form method toPOSTto prevent the parameters from being displayed in the URL.Here's an example of how you can modify your code to use the
POSTmethod:In your view, make sure you update the form method to
POST:By using the
POSTmethod, the form data will be sent in the request body instead of being appended to the URL, effectively hiding the parameters from the address bar.