ASP.NET Cannot perform runtime binding on a null reference - after I'm try to login in my website
<p>I have next controls in my ASP.NET page:</p>

<pre><code>&lt;asp:Content ID="headerPanelContent" ContentPlaceHolderID="mainContent" runat="server"&gt;
    &lt;asp:Repeater ID="rptHomePage" runat="server" DataSourceID="dsHomePage" OnItemCreated="rptHomePage_ItemCreated"&gt;
        &lt;ItemTemplate&gt;
            &lt;div class="content-forum-section"&gt;
                &lt;table class="forum-table-view"&gt;
                    &lt;tr class="content-forum-name f-background"&gt;
                        &lt;td colspan="3"&gt;
                            &lt;h2 class="t-color-white"&gt;&lt;%# Eval("forumName") %&gt;&lt;/h2&gt;
                            &lt;asp:HiddenField ID="hdnForumID" Value='&lt;%# Eval("forumID") %&gt;' runat="server" /&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr class="f-background t-color-white"&gt;
                        &lt;td style="width: 85%;"&gt;Section
                        &lt;/td&gt;
                        &lt;td style="width: 9%;"&gt;Themes
                        &lt;/td&gt;
                        &lt;td style="width: 9%;"&gt;Messages
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;asp:Repeater ID="rptSections" runat="server" DataSourceID="dsSectionsInForum" OnItemCreated="rptSections_ItemCreated"&gt;
                        &lt;ItemTemplate&gt;
                            &lt;tr class="lightgrey-background"&gt;
                                &lt;td&gt;
                                    &lt;div class="forum-section-container"&gt;
                                        &lt;a href='&lt;%# "./Section.aspx?id=" + Eval("SectionId").ToString() %&gt;'&gt;&lt;%#Eval("Name") %&gt;&lt;/a&gt;
                                        &lt;br /&gt;
                                        &lt;asp:Repeater ID="rptSubsections" runat="server" DataSourceID="dsSubsectionsInSection"&gt;
                                            &lt;ItemTemplate&gt;
                                                &lt;div class="subsection-link"&gt;
                                                    &lt;a href='&lt;%# "./Subsection.aspx?id=" + Eval("SubsectionId").ToString() %&gt;'&gt;&lt;%# Eval("Name") %&gt;&lt;/a&gt;
                                                &lt;/div&gt;
                                            &lt;/ItemTemplate&gt;
                                        &lt;/asp:Repeater&gt;
                                        &lt;asp:LinqDataSource ID="dsSubsectionsInSection" runat="server"&gt;
                                        &lt;/asp:LinqDataSource&gt;
                                    &lt;/div&gt;
                                &lt;/td&gt;
                                &lt;td&gt;0
                                &lt;/td&gt;
                                &lt;td&gt;0
                                &lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/ItemTemplate&gt;
                    &lt;/asp:Repeater&gt;
                    &lt;asp:LinqDataSource ID="dsSectionsInForum" runat="server"&gt;&lt;/asp:LinqDataSource&gt;
                &lt;/table&gt;
            &lt;/div&gt;
        &lt;/ItemTemplate&gt;
    &lt;/asp:Repeater&gt;
    &lt;asp:LinqDataSource ID="dsHomePage" runat="server"
        ContextTypeName="PWO_Projekt.ForumDBDataContext"
        Select="new(Id as forumID, Name as forumName)"
        TableName="Forums"&gt;
    &lt;/asp:LinqDataSource&gt;
&lt;/asp:Content&gt;
</code></pre>

<p>Code behind:</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void rptHomePage_ItemCreated(object sender, RepeaterItemEventArgs e)
    {
        var forumDetails = (dynamic)e.Item.DataItem;
        int forumID = forumDetails.forumID;
        LinqDataSource lds = (LinqDataSource)e.Item.FindControl("dsSectionsInForum");
        lds.ContextTypeName = "PWO_Projekt.ForumDBDataContext";
        lds.TableName = "Sections";
        lds.Where = "ForumId == @id";
        lds.WhereParameters.Add("id", DbType.Int32, forumID.ToString());
        lds.DataBind();
    }

    protected void rptSections_ItemCreated(object sender, RepeaterItemEventArgs e)
    {
        var sectionDetails = (dynamic)e.Item.DataItem;
        int sectionID = sectionDetails.SectionId;
        LinqDataSource lds = (LinqDataSource)e.Item.FindControl("dsSubsectionsInSection");
        lds.ContextTypeName = "PWO_Projekt.ForumDBDataContext";
        lds.TableName = "Subsections";
        lds.Where = "SectionId == @id";
        lds.WhereParameters.Add("id", DbType.Int32, sectionID.ToString());
        lds.DataBind();
    }
</code></pre>

<p>Also I have on this page my user control as login form:</p>

<pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LoginForm.ascx.cs" Inherits="PWO_Projekt.Controls.LoginForm" %&gt;
&lt;form&gt;
&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;Login
        &lt;/td&gt;
        &lt;td&gt;
            &lt;asp:TextBox ID="txtLogin" runat="server" CssClass="smallfont" Columns="15"&gt;&lt;/asp:TextBox&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;asp:CheckBox ID="chRemeber" runat="server" /&gt;
            Remember me
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Password
        &lt;/td&gt;
        &lt;td&gt;
            &lt;asp:TextBox ID="txtPassword" runat="server" TextMode="Password" CssClass="smallfont" Columns="15"&gt;&lt;/asp:TextBox&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;asp:Button ID="btnLogin" runat="server" Text="Log in" OnClick="btnLogin_Click" /&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td colspan="3"&gt;
            &lt;asp:Label ID="lblError" runat="server" Text="" ForeColor="Red"&gt;&lt;/asp:Label&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p></p>

<p>And code behind:</p>

<pre><code>protected void btnLogin_Click(object sender, EventArgs e)
    {
        string login = txtLogin.Text.Trim();
        string password = CommonFunctions.getMd5Hash(txtPassword.Text.Trim());
        using (ForumDBDataContext db = new ForumDBDataContext())
        {
            db.Connection.ConnectionString = CommonFunctions.getConnectionString();
            var user =
                from u in db.Users
                where (u.Login == login) &amp;&amp; (u.Password == password)
                select u;
            if (user.Count() == 1)
            {
                Session["UserLogin"] = login;
                Response.Redirect("./");
            }
        }
    }
</code></pre>

<p>But after pressing Login button I have next error on my page:</p>

<blockquote>
  <p>Cannot perform runtime binding on a null reference Description: An
  unhandled exception occurred during the execution of the current web
  request. Please review the stack trace for more information about the
  error and where it originated in the code.</p>
</blockquote>

<pre><code>{

var forumDetails = (dynamic)e.Item.DataItem;

int forumID = forumDetails.forumID; //error is here

LinqDataSource lds = (LinqDataSource)e.Item.FindControl("dsSectionsInForum");

lds.ContextTypeName = "PWO_Projekt.ForumDBDataContext";
</code></pre>

<p>And I don't understand what the problem here. This exception rises only after pressing 
Login button (As I understand after PostBack)</p>
