Reputation: 6618
How can I redirect the response to an IFrame?
Upvotes: 2
Views: 2372
Reputation:
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")
Upvotes: 1
Reputation: 61518
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
Upvotes: 2
Reputation: 1163
. . . not totally sure what your trying to do, but you normally control the source of an iframe through javascript
Upvotes: 0