Loading ...

Create multiple Iframes with an Array (C#)

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  web forms / data controls   » Create multiple Iframes with an Array (C#)

Create multiple Iframes with an Array (C#)

Posts under the topic: Create multiple Iframes with an Array (C#)

Posted: 10/11/2011

Lurker 5  points  Lurker
  • Joined on: 10/11/2011
  • Posts: 1

Hi,

I'm a newbie & I need to create multiple iframes with an array, in a for loop! Is it even possible to do that! I accomplished it with Javascript, but I'm having a heck of a time doing the same in C#. Here's what I did in Javascript:

 

[code]

function load_startfrm() {

        for(i = 0; i < 25; i++) {
            ifrm[i] = document.createElement("IFRAME");
            ifrm[i].scrolling = "no";
            ifrm[i].setAttribute("src", 'http://localhost:8080/Map/png5.png');
            ifrm[i].style.width = 19.5 + "%";
            ifrm[i].style.height = 19.5 + "%";
            document.body.appendChild(ifrm[i]);
        }
        doLoop()
    }

    function load_frames() {
        
         for (var i in ifrm) {
              
           ifrm[i].setAttribute("src", url_name());
           document.body.appendChild(ifrm[i])
           //document.write();
        }
       loop = setTimeout("load_frames()", 2500);
    }

[/code]

In the load_frames function, I have another function (url_name()) that randomly gets my URL. I would like to do something similar, but with C#

Thanks in advance!!

Marc


Page 1 of 1 (1 items)