I am trying to put the following command into a FOR / NEXT loop but I can't parse the variable correctly
The first line looks like this:
If Not WebBrowser1.IsBusy = True Then WebBrowser1.Document.InvokeScript("__doPostBack", New Object() {"dnn$ctr958$CE_ActiveSocial_Contacts$GridView1", "Page$2"})
I want to count through several pages, so I want to replace the page variable with an integer that counts up. Like the following:
If Not WebBrowser1.IsBusy = True Then WebBrowser1.Document.InvokeScript(variable)
I have tried mixing a string and an object variable together, but I haven't had any luck.
rString = (Chr(34) & "__doPostBack" & Chr(34) & ",")
sString = ("Page$2") ''or a reference to a string and an integer variable
oObject = New Object() {"dnn$ctr958$CE_ActiveSocial_Contacts$GridView1", sString}
to give:
If Not WebBrowser1.IsBusy = True Then WebBrowser1.Document.InvokeScript(rString & oObject)
Can anyone provide any pointers as to what I can do to get the page number to increase in a variable? I have tried using the whole section as a String and this doesn't work either....


Reply With Quote

