Preparation and characteristics of the In-doped ZnO thin films and the n-ZnO:In/p-Si heterojunctions for optoelectronic switch n-ZnO:In/p-Si heterojunctions have been fabricated by sputter deposition of n-ZnO:In on p-Si substrates. The lowest resistivity n-ZnO:In film was obtained at a substrate temperature of 150$^o$C using a ZnO target doped with 2 wt\% In$_2$O$_3$. At substrate temperature above 300$^o$C the resistivity of the film increases as the carrier concentration decreases. This implies a significant decrease in the donor impurity, which is ascribed to evaporation of the indium during film growth. .