C#,,InvokeMember("click")

110 Views Asked by At

I'm working on a WinForms project and am running lines 1 to 7 normally. After the seventh line exits to the for loop (like break;), SendMail() doesn't work. Why?

for (int k = 0; k < 3; k++)
{
    if (mesajlistem[k].InnerText == "test")
    {
        if (saatler[k] != saatlistem[k].InnerText)
        {
            link[k].InvokeMember("click");
            SendMail(document.GetElementById("divItmPrts").InnerHtml); 
        }
    }
}      
1

There are 1 best solutions below

0
On

So its seems that mail gets sent but it is empty

So either

documet.GetElement...

is not return the right thing. Or

Sendmail(xx)

is not correct

So set a breakpoint at the start of SendMail and see if good data is being passed in.

Now fix the broken part

(Not an answer I know, but too long for a comment)