I'm using a universal page viewer to view some content based on a wildcard in the URL. The universal page viewer webpart has a setting to hide the webpart or show a text if no record is found. However, I would like the page to 404 when no record is found. Is this possible?
You could edit the web part to throw an HttpException if no records are returned. I'd recommend cloning the Uni page viewer and editing the clone so that it is not overwritten when you upgrade.
Please, sign in to be able to submit a new answer.