How to secure toilet fill valve hose to canister
Assuming you're talking about something like this:

Source: plumbingsupply.com
and that the tube is connected to the protrusion at the top, I would suggest a simple hose clamp to hold it in place.
Source: hcl-clamping.com
They come in a wide variety of sizes and one small enough to fit that would be pretty cheap. Just don't over tighten and crush the input fitting.
A zip tie might work, as well, and they are as cheap as can be, and when you're using one small enough for that fitting, it's hard to pull on it hard enough to do damage.
If the larger portion of the fitting is still in place, push the tubing on far enough to reach the top of the canister itself and a very small amount of pressure around the smaller diameter portion (from either the zip-tie or the hose clamp) will be enough to squeeze the tube so that it can't slip up over the larger diameter.