The ruler described in the question is Shah-Jehan. He made pilgrimages to Ajmer Sharif for blessings on numerous occasions. Additionally, he was known for his architectural contributions, the most notable being the Taj Mahal. The pilgrimage to Ajmer and seeking blessings were part of his belief in divine support for his reign and family.
Thus, the correct answer is (B) Shah-Jehan.