c# - 将查询字符串隐藏到 URL 中

标签 c# jquery asp.net-mvc asp.net-mvc-3 query-string

我想隐藏显示在我的 URL 中的查询字符串,如下图所示:

enter image description here

我在新窗口中将其打开为::

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/

相关文章:

c# - Web API 中的 LINQ 时间减法

c# - 委托(delegate)、 Action 、事件、Lambda 表达式和 MVVM

jquery - 如何在不删除任何内部标签的情况下替换 anchor 标签的文本?

jquery - Fetch as Google 未在滚动动画 SEO 上显示 Waypoints.js

路由中的 C# WebAPI 核心反斜杠

c# - 如何获取 GridView 上 DataSet.DataTable 的总计?

c# - Linq To SQL InsertAllOnSubmit 和 DeleteAllOnSubmit

javascript - 如何使用jquery从 Angular 服务获取json数据

c# - 单击表单按钮时,Asp-Page-Handler 不会触发 Razor 模型中的方法

asp.net - c# MVC3 ajax.beginform 上传文件不工作