ConnectionString Error
<p>I have a form that after the user inputs a user name and password and click the add button it should add it to my <code>tblUserLogin</code>. Right now it has an error that says:</p>

<blockquote>
  <p>Format of the initialization string does not conform to specification
  starting at index 0.  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>
  
  <p>Exception Details: System.ArgumentException: Format of the
  initialization string does not conform to specification starting at
  index 0.</p>
</blockquote>

<pre><code>Line 40:            // userPassword = (txtPassword.Text);
Line 41: 
Line 42:         using (OleDbConnection conn = new OleDbConnection("PayrollSystem_DBConnectionString"))
Line 43: 
Line 44:          {
</code></pre>

<p>Here is the html code for my <code>frmManageUsers</code> form:</p>

<pre><code>&lt;asp:SqlDataSource ID="SqlDataSource1" runat="server"  
        ConnectionString="&lt;%$ ConnectionStrings:PayrollSystem_DBConnectionString %&gt;"  
        ProviderName="&lt;%$ ConnectionStrings:PayrollSystem_DBConnectionString.ProviderName %&gt;"  

   SelectCommand="SELECT [UserID], [UserName], [UserPassword], [SecurityLevel] FROM [tblUserLogin]"&gt; 
&lt;/asp:SqlDataSource&gt; 

&lt;/div&gt; 
    &lt;div align="center"&gt; 
    &lt;asp:Label ID="Label1" runat="server" Text="Manage Users"&gt;&lt;/asp:Label&gt; 
&lt;p&gt; 
    &lt;asp:Label ID="Label2" runat="server" Text="User Name:"&gt;&lt;/asp:Label&gt; 
    &lt;asp:TextBox ID="txtUserName" runat="server"&gt;&lt;/asp:TextBox&gt; 
&lt;/p&gt; 
&lt;p&gt; 
    &lt;asp:Label ID="Label3" runat="server" Text="Password:"&gt;&lt;/asp:Label&gt; 
    &lt;asp:TextBox ID="txtPassword" runat="server"&gt;&lt;/asp:TextBox&gt; 
&lt;/p&gt; 
        &lt;p&gt; 
            &lt;asp:Label ID="Label4" runat="server" Text="Security Level:"&gt;&lt;/asp:Label&gt; 
            &lt;asp:DropDownList ID="drpdwnlstSecurityLevel" runat="server"  
                onselectedindexchanged="drpdwnlstSecurityLevel_SelectedIndexChanged"&gt; 
                &lt;asp:ListItem&gt;A&lt;/asp:ListItem&gt; 
                &lt;asp:ListItem&gt;U&lt;/asp:ListItem&gt; 
            &lt;/asp:DropDownList&gt; 
&lt;/p&gt; 
        &lt;p&gt; 
            &lt;asp:Button ID="btnAddUser" runat="server" onclick="btnAddUser_Click1"  
    Text="Add User" /&gt;  
  &lt;/p&gt; 
        &lt;p&gt; 
            &lt;asp:Label ID="lblError" runat="server"&gt;&lt;/asp:Label&gt; 
&lt;/p&gt; 

    &lt;/div&gt; 
&lt;p&gt; 
    &amp;nbsp;&lt;/p&gt; 
            &lt;div align="center"&gt; 
&lt;asp:GridView ID="tblUserLogin" runat="server" AutoGenerateColumns="False"  
    DataSourceID="SqlDataSource1"&gt; 
    &lt;Columns&gt; 
        &lt;asp:BoundField DataField="UserID" HeaderText="UserID" InsertVisible="False"  
            SortExpression="UserID"&gt;&lt;/asp:BoundField&gt; 
        &lt;asp:BoundField DataField="UserName" HeaderText="UserName"  
            SortExpression="UserName"&gt;&lt;/asp:BoundField&gt; 
        &lt;asp:BoundField DataField="UserPassword" HeaderText="UserPassword"  
            SortExpression="UserPassword"&gt;&lt;/asp:BoundField&gt; 
        &lt;asp:BoundField DataField="SecurityLevel" HeaderText="SecurityLevel"  
            SortExpression="SecurityLevel"&gt;&lt;/asp:BoundField&gt; 
        &lt;asp:CommandField ShowEditButton="True"&gt;&lt;/asp:CommandField&gt; 
        &lt;asp:CommandField ShowDeleteButton="True"&gt;&lt;/asp:CommandField&gt; 
    &lt;/Columns&gt; 
&lt;/asp:GridView&gt; 
&lt;/form&gt; 
&lt;/body&gt; 
&lt;/html&gt;
</code></pre>

<p>Here's my code:</p>

<pre><code>public partial class frmManageUsers : System.Web.UI.Page 
{ 
    protected void Page_Load(object sender, EventArgs e) 
    { 
    } 

    protected void btnAddUser_Click1(object sender, EventArgs e) 
    { 
        //string userName, userPassword; 

        if (txtUserName.Text == "" || txtUserName.Text == null) 
        { 
            lblError.Text = ("User Name may not be empty"); 
            lblError.ForeColor = System.Drawing.Color.Red; 
            return; 
        } 

        if (txtPassword.Text == "" || txtPassword.Text == null) 
        { 
            lblError.Text = ("Password may not be empty"); 
            lblError.ForeColor = System.Drawing.Color.Red; 
            return; 
        } 

        using (OleDbConnection conn = new OleDbConnection("PayrollSystem_DBConnectionString")) 
        { 
            string insert = "Insert INTO tblUserLogin (UserName, UserPassword, SecurityLevel) Values (@UserName, @UserPassword, @SecurityLevel)"; 
            OleDbCommand cmd = new OleDbCommand(insert, conn); 
            cmd.Parameters.Add("@UserName", txtUserName.Text); 
            cmd.Parameters.Add("@UserPassword", txtPassword.Text); 
            cmd.Parameters.Add("@SecurityLevel", drpdwnlstSecurityLevel.SelectedValue);   
            cmd.ExecuteNonQuery();       
        } 

        Session["UserName"] = txtUserName.Text; 
        Session["Password"] = txtPassword.Text; 
        Session["SecurityLevel"] = drpdwnlstSecurityLevel.SelectedValue; 
        Server.Transfer("frmManageUsers.aspx"); 

        //Server.Transfer("grdUserLogin");  
    } 
}
</code></pre>
