2 Replies - 2306 Views - Last Post: 25 August 2010 - 05:52 PM Rate Topic: -----

#1 pwtc222  Icon User is offline

  • D.I.C Head

Reputation: -3
  • View blog
  • Posts: 72
  • Joined: 02-July 10

Redirect website in content holder

Posted 24 August 2010 - 06:17 PM

Hi
Ok,i got iframe code here:
<iframe src="http://google.com"></iframe>
The page runs on content place holder via masterpage.
And the following back code:

protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Redirect("http://www.google.com/search?hl=en&q=" + TextBox1.Text.ToString() + "");  
        }



The back code runs as a new page in browser,where keyword entered in TextBox1 redirect to new google page to search for the keyword entered in TextBox1.

Now i want the back code function runs on the iframe,where the same function runs on the iframe.

Any ideas?

This post has been edited by pwtc222: 24 August 2010 - 08:58 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Redirect website in content holder

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,957
  • Joined: 21-March 08

Re: Redirect website in content holder

Posted 24 August 2010 - 08:23 PM

You need to do a HttpWebRequest and HttpWebResponse to get the source HTML, then display it in a LiteralControl inside the ContentPlaceHolder.
Was This Post Helpful? 2
  • +
  • -

#3 pwtc222  Icon User is offline

  • D.I.C Head

Reputation: -3
  • View blog
  • Posts: 72
  • Joined: 02-July 10

Re: Redirect website in content holder

Posted 25 August 2010 - 05:52 PM

I got it.

protected void Button1_Click(object sender, EventArgs e)
    {
        iframe1.Attributes.Add("src", "http://www.google.com/search?hl=en&q=" + TextBox1.Text + "");
    }


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1