Click here to Skip to main content
15,885,868 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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?
Posted

Hi,


you can check this once

HTML
<% if (Request.QueryString["name"] != null)
     { %>
     <iframe src='default23.aspx?name=<%=Request.QueryString["name"].ToString()%>' width ="400" height ="400"></iframe>

   <% }%>


All the Best.
 
Share this answer
 
VB
try this...
name=".pdf"
 
Share this answer
 
Comments
chris085 14-Oct-11 7:47am    
That's just the name of the frame. I do want to add the parameter to the src.
devildx2050 15-Oct-11 2:34am    
ok
You will find these parameters in the Request object:
<%=Request["name"] %>
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900