Click here to Skip to main content
14,579,712 members
Rate this:
Please Sign up or sign in to 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
Rate this:
Please Sign up or sign in to vote.

Solution 1

try this...
name=".pdf"
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

You will find these parameters in the Request object:
<%=Request["name"] %>
   
v3
Rate this:
Please Sign up or sign in to vote.

Solution 4

Hi,


you can check this once

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

   <% }%>


All the Best.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100