C# Call Event Handler Dynamic
<p>I am trying to save all the controls from one WebForm using a serialized Dictionary (controlId - string, controlValue - string). Next i want to deserialize that Dictionary and dynamically fill the controls with their values.</p>

<p>The problem is that some of my controls have AutoPostBack true and also event handlers. <strong>Is there a way to dynamically call these event handlers?</strong> I want to avoid another switch by control's id.</p>

<p>Ex:</p>

<pre><code>foreach (KeyValuePair&lt;string, string&gt; kvp in dict)
{
    Control c = findControlRecursive(Page, kvp.Key);
    if (c != null)
    {
        switch (c.GetType().Name)
        {
            case "TextBox":
                ((TextBox)c).Text = kvp.Value;
                if (((TextBox)c).AutoPostBack) .......
</code></pre>

<p>EDIT:</p>

<p>Let's say that I have 10 different forms. each has about 50 controls. I want to add/edit a set of data. I try to avoid tables in database with columns for each control, that's why I want to use serialization.</p>
