300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 自己写的asp.net网站在URL传值过程中隐藏真正值的方法

自己写的asp.net网站在URL传值过程中隐藏真正值的方法

时间:2021-06-17 03:57:01

相关推荐

自己写的asp.net网站在URL传值过程中隐藏真正值的方法

//传送值

protected void btnsend_Click(object sender, EventArgs e)

{

string id, disguise, random;

random = StrOperation.RandString();

disguise = StrOperation.DisGuise();

id = StrOperation.DeTransform3(txtID.Text.Trim().ToString());//StrOperation函数为上一篇博客中的方法集

Response.Redirect("Show.aspx?type=" + id + "&target=" + random + "&id=" + disguise);

}

//接收值

protected void Page_Load(object sender, EventArgs e)

{

if (Request.QueryString["type"] != null && Request.QueryString["type"].ToString() != "")

{

string id, code;

code = Request.QueryString["type"].ToString();

id = StrOperation.Transform3(code);

lblID.Text = id;

}

}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。