The bond propagation and site propagation algorithms are extended to the two-dimensional (2D) Ising model with a surface field. With these algorithms we can calculate the free energy, internal energy, specific heat, magnetization, correlation functions, surface magnetization, surface susceptibility and surface correlations. The method can handle continuous and discrete bond and surface-field disorder and is especially efficient in the case of bond or site dilution. To test these algorithms, we study the wetting transition of the 2D Ising model, which was solved exactly by Abraham. We can locate the transition point accurately with a relative error of 10(-8). We carry out the calculation of the specific heat and surface susceptibility on lattices with sizes up to . The results show that a finite jump develops in the specific heat and surface susceptibility at the transition point as the lattice size increases. For lattice size the parallel correlation length exponent is , while Abraham's exact result is . The perpendicular correlation length exponent for lattice size is , whereas its exact value is 1.0.