Incorrect syntax near '=' Error: dr = cmd.ExecuteReader();
<p>This is my search button on MasterPage.master</p>

<pre><code>&lt;asp:TextBox ID="Search" style="width:339px ; height: 20px;" runat="server" placeholder="Search Woooo" class="textbox" formnovalidate="formnovalidate"&gt;&lt;/asp:TextBox&gt;
&lt;asp:ImageButton ID="ImageButtonSearch" runat="server" ImageUrl="~/Images/Icons/search.png" Width="22px" OnClick="ImageButtonSearch_Click" CausesValidation="False" /&gt;
</code></pre>

<p>MasterPage.master.cs</p>

<pre><code>protected void ImageButtonSearch_Click(object sender, ImageClickEventArgs e)
{
    Response.Redirect("~/search.aspx?Search=" + Search.Value);
}
</code></pre>

<p>search.aspx.cs</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

public partial class Default2 : System.Web.UI.Page
{
    string cs = Global.CS;

    protected void Page_Load(object sender, EventArgs e)
    {
        string search = Request.QueryString["search"];

        if (!Page.IsPostBack)
        {
            string xx = "";
            string sql = @"SELECT studentID FROM Student WHERE username == '"+ search + "'";

            SqlConnection con = new SqlConnection(cs);
            SqlCommand cmd = new SqlCommand(sql, con);

            con.Open();
            SqlDataReader dr;
            dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                xx += string.Format("{0}",dr["sudentID"]);
            }

            dr.Close();
            con.Close();

            test.InnerHtml = xx;
        }
    }
}
</code></pre>

<p>I wanna try search based on username on the search box. But after i clicked on search button, it display Incorrect syntax near '='. Source error: dr = cmd.ExecuteReader();. I already search the problem through many places but i still can't understand. I'm still new at c#</p>