如何在Asp.Net应用程序中隐藏查询字符串参数值 [英] How to hide Query String parameter value in Asp.Net application

查看:99
本文介绍了如何在Asp.Net应用程序中隐藏查询字符串参数值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


这是Atif。


我在Asp.Net中隐藏查询字符串参数值时遇到问题。


例如。
http://ITDEPTINVOICE/InvoiceEntry.aspx?Name = Atif%20Zafar%20Khan


我想隐藏" ?姓名= Atif%20Zafar%20Khan"来自网址。


请建议我如何实现它。



提前致谢


Atif Zafar Khan


解决方案

很快,我认为您可以创建一个表单(在任何其他表单之外),如下所示:


  < form id =" hidden_​​form"方法= QUOT; POST" action =" http://ITDEPTINVOICE/InvoiceEntry.aspx">

    &NBSP; < input type =" hidden"命名= QUOT;姓名" value =" Atif Zafar Khan" />

  < / form>


可以使用JavaScript以编程方式定义< input> 元素的值以及整个表单。


当您需要提交数据并导航到下一页时,请按ID查找此表单,然后使用JavaScript调用其
submit()函数。


但您可能会在
https://forums.asp找到确切答案。净/


Hi Guys,

This is Atif.

I am having problem to hide query string parameter value in Asp.Net.

e.g. http://ITDEPTINVOICE/InvoiceEntry.aspx?Name=Atif%20Zafar%20Khan

I want to hide " ?Name=Atif%20Zafar%20Khan " from the url.

Please suggest me how can I achieve it.

Thanks in advance

Atif Zafar Khan

解决方案

Shortly, I think that you can create a form (outside of any other form), like this:

  <form id="hidden_form" method="POST" action="http://ITDEPTINVOICE/InvoiceEntry.aspx">
      <input type="hidden" name="Name" value="Atif Zafar Khan"/>
  </form>

The value of the <input> element, as well as the whole form can be defined programmatically using JavaScript.

When you need to submit the data and navigate to next page, find this form by id, then call its submit() function using JavaScript.

But the exact answers you will probably find at https://forums.asp.net/.


这篇关于如何在Asp.Net应用程序中隐藏查询字符串参数值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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