call sql query in lable
Please help me,I write this code but it doesn't work what is my mistake and what is the correct code ?
protected void Page_Load(object sender, EventArgs e)
    {
        SqlCommand cmd = new SqlCommand();
        cmd.Connection = new SqlConnection(Class1.CnnStr);

        cmd.CommandText = "SELECT MAX(Code) FROM Customer";

        cmd.Connection.Open();
        cmd.Parameters.AddWithValue(Code_lbl.Text,"@MAX(Code)"+1);
        cmd.ExecuteNonQuery();

    }
call sql query in lable
===

Please help me,I write this code but it doesn't work what is my mistake and what is the correct code ?
protected void Page_Load(object sender, EventArgs e)
    {
        SqlCommand cmd = new SqlCommand();
        cmd.Connection = new SqlConnection(Class1.CnnStr);

        cmd.CommandText = "SELECT MAX(Code) FROM Customer";

        cmd.Connection.Open();
        cmd.Parameters.AddWithValue(Code_lbl.Text,"@MAX(Code)"+1);
        cmd.ExecuteNonQuery();

    }