如何找到asp.net网站的POST请求参数? [英] How to find the parameters of POST request to asp.net website?

查看:47
本文介绍了如何找到asp.net网站的POST请求参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨先生,

你能否告诉我找到asp.net网站POST请求参数的步骤。考虑一个具有登录页面的网站,即使用用户名和密码通过POST方法请求进行身份验证。



我的问题是,如何查找参数名称(即参数的变量名称)。请给我解决这个问题的方法。

Hi sir,
Can u tell me the steps to find the parameters of POST request to asp.net website. Consider one website that is having login page, that is authenticating using username and password by using the POST method request.

My question is, how to find the parameter name (i.e variable name of parameter). Kindly give me the solution for this problem.

推荐答案

试试这个



try this

string[] keys = Request.Form.AllKeys; //this will give list of all parameters posted to page
var value = "";
for (int i= 0; i < keys.Length; i++) 
{   
   // to get the value you use
   value = Request.Form[keys[i]];
}



或直接




or directly

var value = Request.Form[YourKey];





通过此链接

POST数据样本


这篇关于如何找到asp.net网站的POST请求参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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