create buttons dynamically to call method and pass in parameter 
<p>I have a dictionary with a key value pair and need to loop through the pairs and create a button for each one and wire up the button to call a method DisplayDocument(string Id) and pass in the Key as a parameter.</p>

<p>Here's what I have so far.</p>

<pre><code>        // test data
        var documents= new Dictionary&lt;string,string&gt;();
        documents.Add("69110","Diploma");
        documents.Add("76404", "Licensure");


        foreach (KeyValuePair&lt;string, string&gt; item in documents)
        {

            MyStringBuilder=MyStringBuilder.Append(item.Value + "   " + item.Key + "&lt;br /&gt;"); 

        }
        printFaxDocuments.InnerHtml = MyStringBuilder.ToString();
</code></pre>

<p>What i want to do is print out the document Key and Value and then a button that the use can click to view the document.  I have the method built to view the document and it requires the Key value to be passed in.  How can I do this?</p>

<p>I'm not sure how to intersperse the button in the text data.  I need to write out the key and value add the button add a <code>"&lt;br/&gt;"</code> and then do the same thing again for the next item in the dictionary.</p>
