ASP.NET:在 URL 中隐藏查询字符串 [英] ASP.NET : Hide Querystring in URL

查看:22
本文介绍了ASP.NET:在 URL 中隐藏查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道我是不是过于乐观,但有没有办法隐藏 URL 中返回的查询字符串?

I don't know if I'm just being overly hopeful, but is there a way to hide the query string returned in the URL?

我所处的场景是我让 page1.aspx 通过帖子将命令重定向到外部服务器,然后将其返回给 page2.aspx.我遇到的唯一问题是,返回变量的查询字符串仍保留在 URL 中.

The scenario I am in is where I have page1.aspx redirecting a command to an outside server via a post, and it returns it to page2.aspx. The only problem I have with this, is that the querystring of the returned variables are still left in the URL.

我只想对普通用户隐藏丑陋的字符串/信息.那么有没有办法在 pageload 方法中编辑和重新加载它,或者我只需要将变量保存在中间人页面上,然后点击第 2 页.

I just want to hide the ugly string/information from the common user. So is there a way to edit and reload that in the pageload method or do I just have to save the variables on a middleman page and then hit page 2.

推荐答案

我不喜欢这种方法,但它会起作用.

I don't like this approach, but it will work.

一旦您知道自己处于需要的位置,您就可以Response.Redirect 到同一页面,它们就会消失.

Once you know you are where you need to be you can Response.Redirect to the same page and they will be gone.

这篇关于ASP.NET:在 URL 中隐藏查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆