The dishwasher powder, and especially the softening salt, promote corrosion. How heavy the corrosion is will depend to some extent on the hardness of the water: harder water needs more softening and more softening will mean more corrosion. There are tabs that you can buy that are designed for use with steel and silver (even more susceptible to corrosion) that I find really* do make a difference and now I only use them when washing knifes or pans.
In general, however, knives are easiest washed by hand. If you do wash them in the dishwasher then use the special tabs, use the shortest, gentlest cycle and take them out and dry them as soon as the cycle has ended.
* I recently bought a pH-meter to help identify the best water filter for the very heavy calcium content in the water here, so I do take these things perhaps a little too seriously.