Good day everyone please i am having challenges to have a button click event in my asp.net project when ever i try to click on my bootstrap theme when designing button it does not take me to the asp.net webform eg(default.aspx.cs) instead it takes me to the default.aspx. so i am unable to write my code under the button without using the asp.net drag and drop button.
- <button ID="btnlogin" class="btn btn-primary btn-block btn-flat" type="submit" runat="server" oneserverclick="btnlogin_onClick" >Sign in </button>
this code is not working. i want whereby whenever i click on the button it makes something like this
- protected void btnlogin_Click(object sender, EventArgs e)
- {
- where i can write code like this
- protected void btnlogin_Click(object sender, EventArgs e)
- {
- SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["loginConnectionString1"].ToString());
- con.Open();
- string query = "select count (*) from log where username ='" + txtuser.Text + "' and password ='" + txtpass.Text + "' ";
- SqlCommand cmd = new SqlCommand(query, con);
- string output = cmd.ExecuteScalar().ToString();
for registration and other codes