本文介绍了我如何从request.querystring获得全部价值.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
localhost1090:/dome/first.aspx?ID = asdh&92k
当我转换为字符串时,它将仅显示"asdh".它会删除其余的&928"值.
localhost1090:/dome/first.aspx?ID=asdh&92k
When I convert to string it will show me just ''asdh''. It removes rest of value ''&928''.
What to do?
推荐答案
localhost1090:/dome/first.aspx?ID=asdh&VAL=92k
更好的建议不要使用&在您的查询字符串中.
better suggestion do not use & in your querystring.
localhost1090:/dome/first.aspx?ID=asdh&NAME=92k
然后通过查询字符串接收
then receive by query string
string id=Request.QueryString["ID"] ;
string na=Request.QueryString["NAME"] ;
string FINAL = id +"&"+na;
您可以同时接收两个值.
you can receive both values.
String MyURL;
MyURL = "http://localhost1090:/dome/first.aspx?ID=" + Server.UrlEncode("asdh&92k
");
这篇关于我如何从request.querystring获得全部价值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!