Ifram & ASP.net

Hello ,
 I want Ifram texbox and button using ASP.NET....
Altaf PatniSoftware DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPRetiredCommented:
   <iframe id="Frame1" runat="server" name="I1" sandbox="allow-same-origin" seamless="seamless"></iframe> 

Open in new window

default.aspx.vb Page_Load
  Frame1.Attributes("src") = ".\WebForm1.aspx"

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Altaf PatniSoftware DeveloperAuthor Commented:
i am using following code for trying to send a value from iframe to webpage and want to submit automatically  using java script, but getting an following error,
"Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://localhost:53182" from accessing a cross-origin frame."

My code is

      function load() {

           // get the iframe in my documnet
    var iframe = document.getElementById("myframe");
    // get the window associated with that iframe
    var iWindow = iframe.contentWindow;

    // wait for the window to load before accessing the content
        var doc = iframe.contentDocument || iframe.contentWindow.document;

        // find the target in the iframe content
        var target = doc.getElementById("txtLrNo");
        target.innerHTML = "Found It!";

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.