crauscher
crauscher

Reputation: 6618

ASP.Net Redirect Response to a IFrame

How can I redirect the response to an IFrame?

Upvotes: 2

Views: 2372

Answers (3)

joshhan
joshhan

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

chakrit
chakrit

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

Bob Dizzle
Bob Dizzle

Reputation: 1163

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

Upvotes: 0

Related Questions