Add items to a list, then make them into ListItems
<p>I want to make some kind of "list" of errors in C#, but I'm not sure how what type to use and how to go about populating it ("Errors" below).</p>

<p>here is some pseudo code for what I'm trying to accomplish. </p>

<pre><code>//...

protected "some list type here" Errors {get;set;} // some other method would populate this..

protected override void OnLoad(EventArgs e) {
    var errorList = new Something(); // we'll just do this for now
    // Validate stuff
    // validation fails, so add a new error message to errorList
    // repeat until you have a list of errors to loop through

    var ul = new ListBox();

    foreach (string errors in Errors) {
        var li = new ListItem { text = errors };
        ul.Items.Add(li);
    }

}
</code></pre>

<p>can anyone help me fill in the blanks for creating some kind of unordered list of errors in this fashion?</p>

<p>My ultimate goal is to grab the error messages from all of the asp:validation controls within an asp:Login control then display each error in a list format</p>
