如何从隐藏的查询字符串中查找值 [英] how to find values from hidden query string

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

问题描述

如何从URL查找隐藏的查询字符串字段?

像这样的URL
http://stusupport12.ignou.ac.in/Result.asp [ http://stusupport12.ignou.ac.in/Result.asp?Program = MCA& eno = 084736004& submit = Submit&hidden_​​submit = OK [

How to Find Hidden Query string Fields From a url?

like this url
http://stusupport12.ignou.ac.in/Result.asp[^]

have hidden query string fields
http://stusupport12.ignou.ac.in/Result.asp?Program=MCA&eno=084736004&submit=Submit&hidden_submit=OK[^]

推荐答案

在按钮确定"中由事件生成.在这种情况下,如果在注册号中输入''",则会收到错误消息,无法显示页面"检查错误,然后您将自行发现参数

错误类型:
用于ODBC驱动程序的Microsoft OLE DB提供程序(0x80040E14)
[Microsoft] [ODBC SQL Server驱动程序] [SQL Server]第1行:"BCA"附近的语法不正确.
/Result.asp,第92行
浏览器类型:
Mozilla/5.0(Windows NT 6.1; WOW64)AppleWebKit/535.1(KHTML,like Gecko)Chrome/13.0.782.107 Safari/535.1
页面:
将50个字节POST到/Result.asp
POST数据:
程序= BCA& eno =%27& submit =提交&hidden_​​submit =确定


如果您正在编程并检查查询字符串,请使用

http://msdn.microsoft.com/en-us/library/ms150046.aspx [ ^ ]
The query strings are generated by the event in the button Ok. In this case if you enter "''" in the enrolment number you will receive an error, "The page cannot be displayed" check the error and you will discover the parameters by yourself

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ''BCA''.
/Result.asp, line 92
Browser Type:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.107 Safari/535.1
Page:
POST 50 bytes to /Result.asp
POST Data:
Program=BCA&eno=%27&submit=Submit&hidden_submit=OK


If you are programming and checking the query string use

http://msdn.microsoft.com/en-us/library/ms150046.aspx[^]


您好,

这不是隐藏的QueryString,而是HTTP帖子( http://en.wikipedia.org/wiki/HTTP_POST [^ ]).

若要访问Post数据(通过非ASP.NET Postbacks!),可以使用Request.Form对象.

示例:
如果您有张贴以下内容的HTML表单:
Hi,

This is not a hidden QueryString, this is a HTTP Post (http://en.wikipedia.org/wiki/HTTP_POST[^]).

To access the Post data (from non-ASP.NET Postbacks!), you can use the Request.Form object.

Example:
If you have a HTML form which posts the following:
value1=hello&value2=world


那么您可以使用以下语法访问这两个变量:


then you can access the two variables by using this syntax:

string value1 = Request.Form["value1"];
string value2 = Request.Form["value2"];



如果您有使用ASP.NET创建的表单(例如,使用<asp:button runat="server" />,则应始终使用ASP.NET事件处理,并且永远不要直接访问Request.Form!). 这是有关ASP.NET回发如何工作的示例: http://www.xefteri.com/article/show.cfm?id = 18 [ ^ ]


希望这会有所帮助.

致以诚挚的问候,祝您编程愉快,
克里斯



If you have a form which was created using ASP.NET (using for example a <asp:button runat="server" />, you should ALWAYS use the ASP.NET eventhandling and you should never access the Request.Form directly!
Here is a example about how a ASP.NET postback should work: http://www.xefteri.com/articles/show.cfm?id=18[^]


Hope this helps.

Best regards and happy coding,
Chris


这篇关于如何从隐藏的查询字符串中查找值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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