我想隱藏其中顯示了我的網址查詢字符串,如圖片::隱藏查詢字符串URL進入
我打開它變成新窗口爲::
1圖所示)jQuery代碼到Oepn新窗口:
var url = rootUrl("Home/Test?Docs=" + check);
var w = window.open(url, '_blank');
而且 2)控制器(服務器端)代碼:
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顯示在查詢字符串中。 我只想隱藏Querystring以獲得更高的安全性。 我該怎麼做?
請點擊此鏈接:http://stackoverflow.com/questions/3951768/window-open-and-pass-parameters-by-post-method –
你在問錯誤的問題。無論是否有人可以看到文檔ID,都不應該影響您的Web應用程序的安全性。如果你依靠隱藏一個變量來保護你的應用程序,你做錯了。有關更多信息,請參閱http://stackoverflow.com/a/245586/130387 – Tommy
@BappiDatta但是,如上所示,我發佈的URL列表中的文檔可能更多。那麼在那種情況下我需要隱藏這些ID。 – Rahul