I bought the cargo net that was recommended in this thread but can't seem to figure out the best way to secure the cargo net... This is the best way I could figure out for attaching the cargo net but it doesn't seem very secure!
A better way would be to take some paracord (if you don't know what that is, I feel bad that your parents didn't train you properly, :lol

, or you could use some nylon type of rope, don't need anything too special... tie it in a large loop that will allow you to put the loop around the grab rail as if it was one and pass it through itself, then loop it around itself to make a bit of a knot so that it wont come off easily. I forget the term for that kind of knot but it works rather well.
Leave a small enough loop at the end just big enough to pass the hook through and you're done, with that loop. Now do this a few more times and you should be done.
This is how I've done it a few time and it works rather well.
I've also done this for hooking to other locations. If you are concerned about the edges of the area that you are attaching to then make 2 loops a little larger than you will need as the combination of the 2 loops will make it take more to tie together.
use the 2 loops together and tie it just as before and if one breaks the other will be there to hold it. Just check them from time to time and you will be good.
That's the easiest solution for most bikes.
Other bikes you can get bolt replacements that will give you great little "spools" that you can then use to hook on to. I had a set of those on the vulcan, I really liked those... They kept the back of the bike looking classy. The problem though is that they don't make them for every bike.