SelectedIndexChanged takes a lot of time
<p>I have used below code for loading and SelectedIndexChanged of my dropdown list.
When I change value of drop down list, it takes a lot of time until it shows value in the label of my page.</p>

<pre><code>Label1.Text = "Review Number:" + newReview + "(for preparing of Rev." + newRev;


protected void ddlProjectDocument_SelectedIndexChanged(object sender, EventArgs e)
{
    _DataContext = new EDMSDataContext();

    int newRev;
    int newReview;

    var x = ddlProjectDocument.SelectedValue;

    var MaxRev = (from rev in _DataContext.tblTransmittalls
                  where rev.DocID.ToString() == ddlProjectDocument.SelectedValue
                  select  rev.REV).Max();

    if (MaxRev == null)
    {
        newRev = 0;
    }
    else
    {
         newRev = Convert.ToInt32(MaxRev) + 1;
    }

    var MaxReview = (from rev in _DataContext.tblFiles
                     where (rev.DocId.ToString() == ddlProjectDocument.SelectedValue) &amp;&amp;
                           (rev.Rev.ToString() == MaxRev)
                     select rev.Review).Max();

    if (MaxReview == null)
    {
        newReview = 1;
    }
    else
    {
         newReview = Convert.ToInt32(MaxReview) + 1;
    }

    Label1.Text = "Review Number:" + newReview + "(for preparing of Rev." + newRev;       
}

protected void ddlProjectDocument_Load(object sender, EventArgs e)
{
    var query = from p in _DataContext.tblDocuments
                orderby p.DocumentNo
                select p;

    int maxs = 0;

    foreach (tblDocument v in query)
    {
        if (v.DocumentNo.Length &gt; maxs)
            maxs = v.DocumentNo.Length;
    }

    foreach (tblDocument vv in query)
    {
        string doctitle = vv.DocumentNo;

        for (int i = vv.DocumentNo.Length; i &lt; maxs ; i++)
        {
             doctitle += "&amp;nbsp;";
        }

        doctitle += "&amp;nbsp;|&amp;nbsp;";
        doctitle += vv.TITLE;

        // Use HtmlDecode to correctly show the spaces
        doctitle = HttpUtility.HtmlDecode(doctitle);
        ddlProjectDocument.Items.Add(new ListItem(doctitle, vv.DocId.ToString()));
    }
}
</code></pre>
