While solving an integral doing trigonometric substitution, I ended up at solving

$$\int\frac{\sec\theta}{\tan^2\theta}d \theta$$

I know by head that the answer is 

$$-\csc\theta+C$$

However, I could not figure out how to do it manually. I've first tried to transform the integral to $$\int\csc\theta\cot\theta$$ and then integrate by part, but the end result was not at all correct.

Now I suppose that the path I've chosen is incorrect, so please would someone point me in the right direction ?

Thanks.