Object reference not set to an instance of an object errors when using CreateUserWizard
<p>The error - "Object reference not set to an instance of an object" occured when I hit the "Next' button of my CreateUserWizard controls. I had checked through my codes that I did not leave any of my variables null. but i still can't solve this errors.</p>

<pre><code> Source Error: 

    Line 29:         object UserGUID = User.ProviderUserKey;
    Line 30: 
    Line 31:         DataSource.InsertParameters.Add("UserId", UserGUID.ToString()); //this is the line that caused the error
    Line 32: 
    Line 33:         DataSource.Insert();

This is my html code file: 

 &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;
        &lt;asp:CreateUserWizard ID="CreateUserWizard1" runat="server" 
            OnCreatedUser="CreateUserWizard1_CreatedUser" CreateUserButtonText="Next" 
            FinishCompleteButtonText="Create User" Height="330px" 
            Width="512px"&gt;
            &lt;WizardSteps&gt;

                &lt;asp:CreateUserWizardStep ID="CreateUserWizardStep2" runat="server" &gt;
                &lt;ContentTemplate&gt;
                    &lt;table&gt;
                        &lt;tr&gt;
                            &lt;th&gt;User Information&lt;/th&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;Username:&lt;/td&gt;
                            &lt;td class="style2"&gt;
                                &lt;asp:TextBox runat="server" ID="UserName" /&gt;
                                &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator9" ControlToValidate="UserName" 
                                    ErrorMessage="Username is required." /&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;Password:&lt;/td&gt;
                            &lt;td class="style2"&gt;
                                &lt;asp:TextBox runat="server" ID="Password" TextMode="Password" /&gt;
                                &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator10" ControlToValidate="Password" 
                                    ErrorMessage="Password is required." /&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;Confirm Password:&lt;/td&gt;
                            &lt;td class="style2"&gt;
                                &lt;asp:TextBox runat="server" ID="ConfirmPassword" TextMode="Password" /&gt;
                                &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator13" ControlToValidate="ConfirmPassword" 
                                    ErrorMessage="Confirm Password is required." /&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;
                                Email:&lt;/td&gt;
                              &lt;td class="style2"&gt;
                                &lt;asp:TextBox runat="server" ID="Email" /&gt;
                                  &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" ControlToValidate="Email" 
                                      ErrorMessage="Email required."&gt;&lt;/asp:RequiredFieldValidator&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;Question:&lt;/td&gt;
                            &lt;td class="style2"&gt;
                                &lt;asp:TextBox runat="server" ID="Question" /&gt;
                                &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator12" ControlToValidate="Question" 
                                    ErrorMessage="Question is required." /&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;Answer:&lt;/td&gt;
                            &lt;td class="style2"&gt;
                                &lt;asp:TextBox runat="server" ID="Answer" /&gt;
                                &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator14" ControlToValidate="Answer" 
                                    ErrorMessage="Answer is required." /&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td colspan="2"&gt;
                                 &lt;asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                        ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."&gt;&lt;/asp:CompareValidator&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td colspan="2"&gt;
                                &lt;asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"&gt;&lt;/asp:Literal&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;


                &lt;/ContentTemplate&gt;
                &lt;/asp:CreateUserWizardStep&gt;
                &lt;asp:WizardStep ID="CreateUserWizardStep0" runat="server" Title="User Details"&gt;
                    &lt;table&gt;
                        &lt;tr&gt;
                            &lt;th&gt;Billing Information&lt;/th&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;Name:&lt;/td&gt;
                            &lt;td class="style1"&gt;
                                &lt;asp:TextBox runat="server" ID="CustName" /&gt;
                                  &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator18" ControlToValidate="CustName"
                                     ErrorMessage="Name is required."  /&gt;
                                     &lt;/td&gt;
                        &lt;/tr&gt; 
                        &lt;tr&gt;
                            &lt;td&gt;Contact Number:&lt;/td&gt;
                            &lt;td class="style1"&gt;
                                &lt;asp:TextBox runat="server" ID="CustNum"  /&gt;
                                &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator19" ControlToValidate="CustNum"
                                     ErrorMessage="Contact num is required."  /&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;   
                        &lt;tr&gt;
                            &lt;td&gt;Role:&lt;/td&gt;
                            &lt;td class="style1"&gt;
                                &lt;asp:DropDownList ID="CustRole" runat="server" AutoPostBack="True" Height="16px" 
                                    Width="123px"&gt;
                                    &lt;asp:ListItem&gt;&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem&gt;Bride&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem&gt;Groom&lt;/asp:ListItem&gt;
                                &lt;/asp:DropDownList&gt;
                                &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator20" ControlToValidate="CustRole"
                                     ErrorMessage="Role is required." /&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;                
                        &lt;tr&gt;
                            &lt;td&gt;
                                Status:&lt;/td&gt;
                            &lt;td class="style1"&gt;
                                &lt;asp:DropDownList ID="CustStatus" runat="server" AutoPostBack="True" 
                                    Height="17px" Width="121px"&gt;
                                    &lt;asp:ListItem&gt;&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem&gt;Status A&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem&gt;Status B&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem&gt;Status C&lt;/asp:ListItem&gt;
                                &lt;/asp:DropDownList&gt;
                                &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" ControlToValidate="CustStatus"
                                    ErrorMessage="Status is required."/&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;
                                &amp;nbsp;&lt;/td&gt;
                            &lt;td class="style1"&gt;
                                &amp;nbsp;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;
                                Partner&amp;#39;s Name:&lt;/td&gt;
                              &lt;td class="style1"&gt;
                                &lt;asp:TextBox runat="server" ID="PName"  /&gt;
                                &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ControlToValidate="PName"
                                     ErrorMessage="PName is required."  /&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;
                                Partner Email:&lt;/td&gt;
                            &lt;td class="style1"&gt;
                                &lt;asp:TextBox runat="server" ID="PEmail"  /&gt;

                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;
                                PRole:
                            &lt;/td&gt;
                            &lt;td class="style1"&gt;
                                &lt;asp:DropDownList ID="PRole" runat="server" AutoPostBack="True" Height="16px" 
                                    Width="123px"&gt;
                                    &lt;asp:ListItem&gt;&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem&gt;Bride&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem&gt;Groom&lt;/asp:ListItem&gt;
                                &lt;/asp:DropDownList&gt;
                                &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator7" ControlToValidate="PRole"
                                     ErrorMessage="PRole is required." /&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td&gt;
                                Wed Date:
                            &lt;/td&gt;
                            &lt;td class="style1"&gt;
                                &lt;cc1:DatePicker ID="WedDate" runat="server" CalendarDate="" 
                                    TextCssClass="" /&gt;
                                &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" ControlToValidate="WedDate"
                                    ErrorMessage="Wedding date required"/&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                &lt;/asp:WizardStep&gt;

                &lt;asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server"&gt;
                    &lt;ContentTemplate&gt;
                        &lt;table&gt;
                            &lt;tr&gt;
                                &lt;td align="center" colspan="2"&gt;
                                    Complete&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;
                                    Your account has been successfully created.&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td align="right" colspan="2"&gt;
                                    &lt;asp:Button ID="ContinueButton" runat="server" CausesValidation="False" 
                                        CommandName="Continue" Text="Continue" ValidationGroup="CreateUserWizard1" /&gt;
                                &lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/table&gt;


                       &lt;asp:SqlDataSource ID="InsertExtraInfo" runat="server" ConnectionString="&lt;%$ ConnectionStrings:ASPNETDBConnectionString1 %&gt;"
                        InsertCommand="INSERT INTO [UserDetails] ([UserId], [CustName], [CustNum], [CustRole], [CustStatus], [PName], [PEmail], [PRole], [WedDate]) VALUES (@UserId, @CustName, @CustNum, @CustRole, @CustStatus, @PName, @PEmail, @PRole, @WedDate)"
                        ProviderName="&lt;%$ ConnectionStrings:ASPNETDBConnectionString1.ProviderName %&gt;"&gt;
                        &lt;InsertParameters&gt;
                            &lt;asp:ControlParameter Name="CustName" Type="String" ControlID="CustName" PropertyName="Text" /&gt;
                            &lt;asp:ControlParameter Name="CustNum" Type="String" ControlID="CustNum" PropertyName="Text" /&gt;
                            &lt;asp:ControlParameter Name="CustRole" Type="String" ControlID="CustRole" PropertyName="Text" /&gt;
                            &lt;asp:ControlParameter Name="CustStatus" Type="String" ControlID="CustStatus" PropertyName="Text" /&gt;
                            &lt;asp:ControlParameter Name="PName" Type="String" ControlID="PName" PropertyName="Text" /&gt;
                            &lt;asp:ControlParameter Name="PEmail" Type="String" ControlID="PEmail" PropertyName="Text" /&gt;
                            &lt;asp:ControlParameter Name="PRole" Type="String" ControlID="PRole" PropertyName="Text" /&gt;
                            &lt;asp:ControlParameter Name="WedDate" Type="String" ControlID="WedDate" PropertyName="Text" /&gt;
                        &lt;/InsertParameters&gt;

                    &lt;/asp:SqlDataSource&gt;

                    &lt;/ContentTemplate&gt;
                &lt;/asp:CompleteWizardStep&gt;
            &lt;/WizardSteps&gt;

        &lt;/asp:CreateUserWizard&gt;
        &lt;br /&gt;
    &lt;/div&gt;

This is the code behind: 

    using System;
    using System.Data;
    using System.Configuration;
    using System.Web.Security;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    public partial class Register : System.Web.UI.Page
    {
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
    {
        TextBox UserName=
        (TextBox)CreateUserWizardStep2.ContentTemplateContainer.FindControl("UserName");

        SqlDataSource DataSource =
        (SqlDataSource)CreateUserWizardStep2.ContentTemplateContainer.FindControl("InsertExtraInfo");

       MembershipUser User = Membership.GetUser(UserName.Text);

        object UserGUID = User.ProviderUserKey;

        DataSource.InsertParameters.Add("UserId", UserGUID.ToString());  //the error lies at here

        DataSource.Insert();

    }
    }
</code></pre>
