I'm trying to parse my richTextBox and call my function every time I have a new line in my richTextBox.

For example, in my richTextBox I will have :

```
A
B
C

```

For each value, I would like to call my function "removePO()" with the associated value.
But my code only use the last element (in our example, it will just use the "C")

Here is my code : 

```
//Global vars
string[] lines;

function a(){
    // .... some stuff

    // I get the value of my rich TextBox
    lines = richTextBox1.Lines;

    //Foreach value, I call my remove function
    foreach(String line in lines)
    {
        removePO();
    }
}

private void removePO()
    {
        webBrowser1.Document.GetElementById("ctl00_cphContent_txtSAPOrderId").SetAttribute("value", "00" + line);
        webBrowser1.Document.GetElementById("ctl00_cphContent_btnSearchOrder").InvokeMember("Click");
        while (webBrowser1.ReadyState != WebBrowserReadyState.Complete)
        {
            Application.DoEvents();
        }
        SendKeys.Send(username);
        SendKeys.Send("{TAB}");
        SendKeys.Send(password);
        SendKeys.Send("{ENTER}");

        webBrowser1.DocumentCompleted += webBrowser1_DocumentCompleted;
    }

protected void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
    {
        try
        {
            HtmlElement el = webBrowser1.Document.GetElementById("content").GetElementsByTagName("a")[0];
            String anchorText = el.InnerText; // will contain "K"
            String url = el.GetAttribute("href"); // will contain "test"
            el.SetAttribute("onclick", "true");
            el.InvokeMember("Click");
            webBrowser1.DocumentCompleted += webBrowser1_DocumentCompleted2;
        }
        catch(Exception ex)
        {
            Console.WriteLine("Ex Exception : " + ex);
        }
    }

protected void webBrowser1_DocumentCompleted2(object sender, WebBrowserDocumentCompletedEventArgs e)
    {
        try
        {
            HtmlElement delete = webBrowser1.Document.GetElementById("ctl00_cphContent_lnkDeleteRequest");
            delete.SetAttribute("onclick", "true");
            delete.InvokeMember("Click");
        }
        catch (Exception delete)
        {
            Console.WriteLine("Delete Exception : "+delete);
        }

    }

```

Do you have any idea why this is not working?
Thanks!