tags:

views:

803

answers:

3

How can I redirect the response to an IFrame?

A: 

. . . not totally sure what your trying to do, but you normally control the source of an iframe through javascript

Bob Dizzle
+1  A: 

Do you mean from the server-side? - You can't!

You'll have to do it on the client side.

Say, use a javascript that sends an AJAX request and then embed your response information in the AJAX response. And have the javascript read the response and changes the page in the intended frame accordingly

chakrit
A: 

You can do this through a post-back.

Add a tag to your iframe like this:

< iframe runat="server" id="myIframe" />

in your server-side code (button click, link click, whatever posts back):

myIframe.attributes.add ("src", "webpage.aspx")