Some people can do this with no problem (usually those in their 20's, with no knee problems), but I personally try to rotate my cardio so I don't do two similar workouts back-to-back. It also keeps your body guessing a bit so you don't get too efficient at one form of exercise and thus burn fewer calories.
Since I've been strict about this "no back-to-back" rotation, I haven't had some of the knee pain I had in the past. I also think it's fun to try different things. I currently mix it up between indoor cycling, kickboxing and step.