This page is similar in function to a page within your application - in otherwords it does not use ScriptX but provides navigation to a page that does.
The next page may contain a form with a print button, it may display a report and provide a print button. Whatever the function, it uses ScriptX and requires that ScriptX is installed.
In these samples we are using the MeadCo ScriptX Helpers for ASP.NET MVC package available from Nuget. This package provides helpers to quickly generate the required HTML elements for ScriptX and the javascript code to control the installation process and also provides ready-rolled helper pages to assist users with detailed descriptions of the prompts and errors and they encounter.
Implement an intermediate page that ensures ScriptX is installed and available and if not provides the UI to inform the user and install ScriptX before navigating on to the page that uses ScriptX.
Implement the availability and and verification functionality as part of the page that uses ScriptX but navigate to a secondary page to assist with the installation. For this to succeed, the user must be able to navigate away from the page and back again without losing their working context (e.g.query parameters / form post results).
The first simple sample is the bare minimum. But, it is useful to be able to provide assistance to users when things go wrong and it isn't helpful to mix this logic in to a page whose purpose is printing and the business logic that goes with it. This useful assistance in a separate page is what the second and third examples illustrate.
The standard behaviour of the MeadCo ScriptX Helpers for ASP.NET MVC package is to assist with installing a single version of ScriptX as added to the application with the dependent binaries package. This samples application uses a custom version of a provider interface to deliver any requested version of ScriptX from the MeadCo codestore (you can select different versions in the Setup section on the home page).
The implementation has no dependency on any javascript library (such as jQuery, Angular etc). If you prefer not to use the library or are using some other server side system then view source to inspect the html elements and javascript code that has been emitted and copy/use in any way that is helpful to you.