我想隐藏显示在我的 URL 中的查询字符串,如下图所示:
我在新窗口中将其打开为::
1)打开新窗口的Jquery代码:
var url = rootUrl("Home/Test?Docs=" + check);
var w = window.open(url, '_blank');
和 2) Controller (服务器端)代码:
public class TestViewModel
{
public string Docs { get; set; }
public long DocIDs { get; set; }
public long TestIDs { get; set; }
}
public ActionResult Test(TestViewModel Test)
{
return View();
}
但在这种情况下,文档 ID 显示在查询字符串中。 我只想隐藏查询字符串以提高安全性。 我该怎么做?
最佳答案
您可以改为执行发布请求。如果你希望它被加密,你应该通过 https 发送它
关于c# - 将查询字符串隐藏到 URL 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21422390/