Though some types of diarrhea, such as those due to other medical conditions, are unavoidable, infectious diarrhea can be prevented.
The most important way to avoid diarrhea is to avoid coming into contact with infectious agents that can cause it. This means that good hand washing and hygiene are very important.
Also, if you travel to developing countries, you should take the following precautions:
Drink only bottled water, even for tooth brushing
Avoid eating food from street vendors...