读取aspx中的querystring值 [英] Read a querystring value in aspx
本文介绍了读取aspx中的querystring值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我确实想从网址中读取参数值.我的意思不是在后面的代码中,而是要在aspx文件中使用它.
这是网址:... document.aspx?name = filename.pdf
现在,我想获取文件名以在iframe中显示文件:
Hallo,
I do want to read a parameter value from the url. I do not mean in the code behind, instead I want to use it in the aspx-file.
This is the url: ... document.aspx?name=filename.pdf
Now I want to get the filename to display the file in an iframe:
<iframe src="http://www.xxx.xx/files/"+"<%$ QueryString:name%>" height="800" width="800" name="pdf">Text</iframe>
这行不通.
This doesn''t work. How can I get the filename from the url?
推荐答案
QueryString:name%>"height =" 800"width =" 800"name =" pdf> ; Text</iframe>
QueryString:name%>" height="800" width="800" name="pdf">Text</iframe>
这行不通.如何从网址中获取文件名?
This doesn''t work. How can I get the filename from the url?
try this...
name=".pdf"
您将在Request对象中找到以下参数:
<%=Request["name"] %>
You will find these parameters in the Request object:
<%=Request["name"] %>
这篇关于读取aspx中的querystring值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文