Use the View instead of CurrentPage for attaching the HTML attribute.