23
2015
12

【C#、Asp.Net 工具类大全】Request请求工具类

string name = RequestHelper.GetQueryString("name"); //获取请求中的参数name

string param = RequestHelper.GetString("param");

int check_revert = RequestHelper.GetFormInt("check_revert"); //获取请求中的参数check_revert,并转化为整数

string accept_name = RequestHelper.GetFormString("accept_name");

decimal express_fee = RequestHelper.GetFormDecimal("express_fee", 0);

string userip = RequestHelper.GetIP(); //获取IP地址

int click = RequestHelper.GetInt("click", 0); //读取参数click,如果没有返回0

«1»