The temperature dependent giant magnetoresistance effect is investigated theoretically in a magnetically modulated two-dimensional electron gas, which can be realized by depositing two parallel ferromagnets on top and bottom of a heterostructure. Assuming a single particle effective mass Hamiltonian and ballistic transport, the giant magnetoresistance ratio (MRR) is calculated. It is shown that MRR can be tuned by the magnetic field and with the width of the bottom ferromagnet. The MRR shows strong dependence on temperature, but studies indicate that the system even at 4K has 4×104% MRR and it can be used as a device for realistic electron density.