Accessing Dynamic Controls.
I am facing a problem as follows.
In any ON-line shopping site, the no. of items displayed on a page may vary continuously.
Suppose I want to buy 3-4 items. Every item is having a "Buy" button in front of it. So this button should be clicked.
How to select a particular item & how to click the proper "Buy" button?
Any piece of code will be more helpful.
Thanks in advance.
Re: Accessing Dynamic Controls.
Your buttons are probably named something similar - btnItem1, btnItem2, etc. Use that fact to build your "list" of possibilities to select.
You can either build your list of items up front, or decide for instance to pick the first X items.
for each wTemp in site.GetChildren()
if ClassOf(wTemp) == HtmlButton
if wTemp.GetCaption() == //some comparison here
//Done building the list. Now, use Listcount to find the number of items and decide how to select.