0.25
is 1/4, so you can get it easily by
double rounded = round(4.0 * hoursEntered) / 4.0
round
does not exist. You must use appropriate rounding function and options. For aspx.cs (C# codebehind) see System.Math.Round
.
Also, to link it to the textbox on the webpage, you will need some rule/validator or textchange handler or anywhere around the typical text parsing. You may also try doing it in JavaScript client side, the *4/4 trick stays the same, just round
function will have different name.