Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with iframe control

Problem with iframe control

Scheduled Pinned Locked Moved ASP.NET
helpdatabasesysadmin
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vsree
    wrote on last edited by
    #1

    Hi In my webform(webform1.aspx), i have an iFrame control, along with with many web controls. The "src" attribute of it refers to another webform.(webform2.aspx) I want text to appear in the frame on clicking a button which fetches the value from db. Am using a session variable to hold the text to be assigned for iframe. And am using the following code in WebForm1.aspx private void Button1_Click(object sender, System.EventArgs e) { Session["Cont"] = "This is a page"; HtmlGenericControl frame1 = (HtmlGenericControl)this.FindControl("txtFrame"); frame1.Attributes["src"] = "WebForm2.aspx"; Server.Execute("WebForm2.aspx"); Response.ClearContent(); } And in WebForm2.aspx,Page_Load(..) if(Session["Cont"]!=null) { Literal1.Text = Session["Cont"].ToString(); } The problem is when i click the button in WebForm1.aspx, along with actual text, a textbox with some characters is appearing in the iFrame though there's no other control in the target(Webform2.aspx) other than Literal control. :( Please help me in finding out the actual problem and its solution. Thanks

    ~VSree

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups