problem redirecting page from login page
<p>Hi
Below is the code i m using for login page.but it does not enter to button click.and when i tried to put new button, its button click event opens in aspx page.
I m not getting where exactly the problem is.</p>

<pre><code>protected void btnSubmit_Click(object sender, EventArgs e)
{
    string password = "";
    string query = "select AdminPwd from tbladminlogin where AdminId='" + txtUserName.Text + "'";
    MySqlConnection objMyCon = new MySqlConnection(strProvider);
    objMyCon.Open();
    MySqlCommand cmd = new MySqlCommand(query, objMyCon);
    MySqlDataReader r = cmd.ExecuteReader();
    while (r.Read())
    {
        password = r[0].ToString();
    }
    if (password == "")
    {
        Session["Login"] = false;
        lblMessage.Visible = true;
        lblMessage.Text = "Invalid Username";
        txtUserName.Text = "";
        txtPwd.Text = "";
    }
        // 
    else
    {
        if (txtPwd.Text == password)
        {
            Session["Login"] = true;
            Session["UserName"] = txtUserName.Text;

            Response.Redirect("concertDetail.aspx");
        }
        else if (txtPwd.Text != password)
        {
            Session["Login"] = false;
            lblMessage.Visible = true;
            lblMessage.Text = "Invalid Password";
            txtPwd.Text = "";
        }
    }
    objMyCon.Close();
}
</code></pre>

<p>//aspx page</p>

<pre><code>&lt;div id="login"&gt;
    &lt;%--&lt;div class="response-msg success ui-corner-all"&gt;
                        &lt;span&gt;Success message&lt;/span&gt;
                        Lorem ipsum dolor sit amet, consectetuer adipiscing elit
                    &lt;/div&gt;--%&gt;
    &lt;asp:Label ID="lblMessage" runat="server" Text="Label" Font-Size="Medium" ForeColor="Red"&gt;&lt;/asp:Label&gt;
    &lt;form id="Form1" runat="server"&gt;
    &lt;ul&gt;
        &lt;li&gt;
            &lt;label for="email" class="desc"&gt;
                Username:
            &lt;/label&gt;
            &lt;div&gt;
                &lt;%--&lt;input type="text" tabindex="1" maxlength="255" value="" class="field text full" name="email" id="email" /&gt;--%&gt;
                &lt;asp:TextBox ID="txtUserName" runat="server" MaxLength="255" Width="470px"&gt;&lt;/asp:TextBox&gt;
            &lt;/div&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;label for="password" class="desc"&gt;
                Password:
            &lt;/label&gt;
            &lt;div&gt;
                &lt;%--&lt;input type="text" tabindex="1" maxlength="255" value="" class="field text full" name="password" id="password" /&gt;--%&gt;
                &lt;asp:TextBox ID="txtPwd" runat="server" MaxLength="255" Width="470px"&gt;&lt;/asp:TextBox&gt;
            &lt;/div&gt;
        &lt;/li&gt;
        &lt;li class="buttons"&gt;
            &lt;div style="position: relative; top: -4px; left: 408px; width: 67px; height: 32px;"&gt;
                &lt;div style="position: relative;"&gt;
                &lt;/div&gt;
                &lt;%--&lt;button class="ui-state-default ui-corner-all float-right ui-button" onclick="btnSubmit_Click" type="submit"&gt;Login&lt;/button&gt;--%&gt;
                &lt;asp:Button ID="btnSubmit" runat="server" Text="Login" OnClick="btnSubmit_Click" /&gt;
            &lt;/div&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;/form&gt;
</code></pre>

<p></p>
