Updated code behind logic to redirect to generated html page