Create multiple Iframes with an Array (C#) - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Create multiple Iframes with an Array (C#)

mhammond7635mhammond7635 Posts: 2Member

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:

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 + "%";

function load_frames() {

for (var i in ifrm) {

ifrm[i].setAttribute("src", url_name());
loop = setTimeout("load_frames()", 2500);

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!!

Sign In or Register to comment.