Invalid Column Name Error in SqlDataReader
<p>I am using the SQL Datareader to fill the text boxes in .aspx page. My below</p>

<pre><code>#region "[--------Function To Fill Up All TextBox---------]&gt;"
public void FillTextBox(string Sqlstring)
{


    SqlConnection Conn =  new SqlConnection(ConfigurationManager.ConnectionStrings["SQL Connection String"].ConnectionString);
    SqlDataReader MyDataReader = null;
    SqlCommand MyOleDbCommand = new SqlCommand();
    MyOleDbCommand.Connection = (Conn);
    Conn.Open();
    MyOleDbCommand.CommandText = Sqlstring;
    MyDataReader = MyOleDbCommand.ExecuteReader();
    try
    {

        while (MyDataReader.Read())
        {

            txtuniv.Text = (MyDataReader[0].ToString());
            txtcollrno.Text = (MyDataReader[1].ToString());
            /*txtLastName.Text = (MyDataReader[2].ToString());
            txtClass.Text = (MyDataReader[3].ToString());
            txtSession.Text = (MyDataReader[4].ToString());
            txtobt.Text = (MyDataReader[5].ToString());
            txttot.Text = (MyDataReader[6].ToString());

            */
        }
    }
    catch (System.Exception err)
    {
        MyDataReader.Close();
        Conn.Close();
        Conn.Dispose();
    }

}
#endregion
</code></pre>

<p>In PageLoad() Eveent</p>

<pre><code>    protected void Page_Load(object sender, EventArgs e)
{
    Label1.Text = User.Identity.Name.ToString();

    string SqlStr = null;
    SqlStr = "Select * from TB_User where UserID=" + Label1.Text;
    FillTextBox(SqlStr);
}
</code></pre>

<p>I have table TB_User with columns UserID &amp; Password. It has value test1 &amp; test1 respectively. But it gives folowing error.</p>

<pre><code>    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.

Exception Details: System.Data.SqlClient.SqlException: Invalid column name 'test1'.

Source Error:


Line 40:         Conn.Open();
Line 41:         MyOleDbCommand.CommandText = Sqlstring;
Line 42:         MyDataReader = MyOleDbCommand.ExecuteReader();
Line 43:         try
Line 44:         {
</code></pre>

<p>Please Help</p>
