[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

Making a page formatter c# asp.net

I was wondering if anyone could give me some pointers on how to make a URL like this
http://myweb.com/link.aspx?link.html  and have it place the html page in a frame within the .net page.

I have seen this done many times, but I don’t know the proper terms or have an example to look at.

Thanks,
Sean
0
sean-keys
Asked:
sean-keys
  • 2
1 Solution
 
arantiusCommented:
0
 
sean-keysAuthor Commented:
but how can i make the target part of the main URL it self?

Like this

http://www.myweb.com/border.aspx?iframe.htm

I'm not sure if a "?" is the correct character to use.

0
 
dakydCommented:
Will something like this help?  You use a bit of javascript to extract the link from the URL, and then set the src of the iframe to what's there.  Hope that helps.

<html>
<head>
<script type="text/javascript">
window.onload = setSrc;

function setSrc()
{
  var str = document.location.search.substr(1);
  document.getElementById("theIframe").src = str;
}
</script>
</head>

<body>
<iframe id="theIframe" src=""></iframe>
</body>
</html>
0
 
sean-keysAuthor Commented:
Lookss like that might get it.  I'll see if i cant make something work.

Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now