Reputation: 8346
I have one .aspx page and inside that page I want to call third party url and I should include the content from that url. I can achive this by using iframe but i am restricted to not to use iframe.
Ex:
<body>
my content ......
..................
<Video><url="www.yamaha.com\learnPiano"> Thirdparty video get played here </url> </Video>
.................
..................... my content ....
</body>
Upvotes: 0
Views: 935
Reputation: 22266
You can do this on the server side. Add an ASP:Literal control to your page and name it "OtherContent" for example.
var webRequest = WebRequest.Create("http://www.google.com");
var webResponse = webRequest.GetResponse();
if (webResponse != null)
{
var responseStream = webResponse.GetResponseStream();
if (responseStream != null)
{
var streamReader = new StreamReader(responseStream);
var pageSource = streamReader.ReadToEnd();
OtherContent.Text = pageSource;
}
}
Upvotes: 0