If you are alone you can stay in below:
(1) Backpackers Inn
(2) International Youth Club
(3) Zostel Dharamkot If you are with Family you can always prefer OYO chain of hotels
Go dharamkot. or in the market itself right above the bank, the family give out rooms for home stay. cheap and very safe and in middle of the market. say hello from my side if you do that that place :)
. I would suggest you not to book your hotel online. u'll easily get a hotel on reaching dharamshala. prices quoted on sites are usually higher than they are offline