Answer: you use a regulator as demonstrated in Yura717's link.
However, consider that passing 2A through a 10K (R2) resistor will drop (Ohms law V= I*R) 20,000 Volts and the capacitve reactance of C1 at 60 Hz is 1/(2*pi*60*1^-6) = 2.652K so that also drops 5,304 Volts. If you want 24V out at all, you would have to get 24 + 20,000 + 5,304 = 25,328V from the transformer. Additionally, the resistor would dissipate (W=V*I) around 40KW so think in terms of one the size of a refridgerator but with lots of cooling fans.
In other words, it isn't really a practical circuit at all.
I would go back to basics and read that link, you could improve the efficiency of your design by around 1000% !!
Brian.