无法读取querystring参数。 [英] Unable to read the querystring parameter.
本文介绍了无法读取querystring参数。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图使用javascript传递参数
请参阅ma code
node.navigateurl =javascript:window.open(' + urlofthepage +',width = 200,height = 100); pname =+ trackid;
现在在该页面中使用上面的代码打开,我有编写以下代码
if (Page.Request.QueryString [ pname]!= null )
{
string querystring = Page.Request.QueryString.Get( PNAME跨度>)的ToString();
}
但它总是返回null。从那里传递值但是无法使用QueryString获取它。
可能是什么原因?
解决方案
< blockquote>并不感到惊讶。
尝试:
node.navigateurl = javascript:window.open(' + urlofthepage + ? pname = + trackid + ',width = 200,height = 100) ;
Am trying to pass the parameter using javascript
see ma code
node.navigateurl = "javascript: window.open('" + urlofthepage+ "',width=200,height=100);pname=" + trackid;
now in that page which am opening using above code, i have written the below code
if (Page.Request.QueryString["pname"] != null)
{
string querystring = Page.Request.QueryString.Get("pname").ToString();
}
But it is always returning null. Am passing value from there but unable to fetch it using QueryString.
What could be the reason?
解决方案
Not surprised.
Try:
node.navigateurl = "javascript: window.open('" + urlofthepage+ "?pname=" + trackid + "',width=200,height=100)";
这篇关于无法读取querystring参数。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文