Relay and a solenoid

Hi, I have a tx2-5v relay and a 24v solenoid.

is its possible to drive the solenoid with Arduino, obviously use a separate power supply for the solenoid.

but I'm struggling on how to do the wiring and the code a bit as I am new to Arduino.

could someone please guide me.

thank you

What did a google search give you? There are countless tutorials about this subject.

Do not connect inductive load like relay, motors etc., directly to the Arduino. The easiest way seems to me is to use ULN2308.

Lennyz1988:
What did a google search give you? There are countless tutorials about this subject.

I couldn’t find examples that were any similar to what I was trying to do, if I did I wouldn’t bother being on here

:o Arduino realay :o
I cant believe you didn't find. It is easy. Example: http://www.electroschematics.com/8975/arduino-control-relay/.
Did you search on this web at least for relevant answer?
On the other hand, I think, the forum post shouldn't be like just "Google..."