Freestyle, render some objects with dashed lines and others with solid lines?
Use Groups

Freestyle has an option to apply the Line Set to a previusly created group. You just habe to enable it in the Selection by section and pick Groups. An empty fields will appear below where you can choose what groups will be affected by the linestyle options.



In the image above each cube belongs to a different group (you can see them in the outliner), and each of the two Line Set is targeting one of them.

You can group the selected objects by pressing Ctrl+G and select all the objects with the same material (or something else) with Select linked



What I presented is probably the most versatile way, but you can probably get a similar result by taking advantage of one of the other ways in which you can restrict the Line Style influence (e.g. you can hide your dotted object and use the Visibilty options...).