Tell me I have in the database http://s001.radikal.ru/i195/1201/66/8070bbdfa9f3.png (especially the link because the resolution is large so that it can be clearly seen), how can I do such a cycle in C # so that the element WebBrowser they are constantly viewed one after the other ... and if you add another site to the database, then it will also be viewed, I tried this:

for(int i = 1; i < 100500; i++) { command.CommandText("SELECT Url FROM t_links WHERE ID='" + i + "'"); } 

But he just opens the first site and more and more does not go anywhere.

    2 answers 2

    First, the request, it seems to me, is better to issue this:

     SELECT Url FROM t_links WHERE ID BETWEEN 1 AND 100500 

    And secondly, how do you actually change urls so that they are displayed in the browser? And what are you actually going to do with the page that opens? If you browse, the cycle does not fit.

    • I just need a browser and there are 3 links in the database, and so that they just scroll constantly and I won’t do anything with them, just transitions. - Angus123 pm
    • then first load all the links into the recordset, then do the next by timer and display the current link to the browser - den94
    • Can you give an example of how it will look? ( Preferably C #) - Angus123

    The reasons may be many.

    Try site URLs somewhere to display without opening. The code looks weird.

    • strange! Agree - Specter
    • I’m passing the current URL to a variable of type string, but how to make them replace each other? - Angus123