To create a working ASP.NET MVC example, do the following:
Open Microsoft Visual Studio. Select File > New > Project. The New Project dialog is displayed.
In the New Project dialog, click on Web > ASP.NET Web Application > MVC application and OK.
The New ASP.NET Project - WebApplication dialog is displayed.
Click on Change Authentication, select Windows Authentication and OK. Click Cancel.
The wizard will create all the boilerplate code that is needed for a Windows ASP.NET MVC application.
Select Views > Shared > _Layout.cshtml in the Solution Explorer.
Drag your sever node to the head section of the _Layout.cshtml file.
This generates the boilerplate code.Note: The boilerplate code configures the connection, loads modules from the Qlik Sense client framework, and binds the embedded visualization objects to the app running in the Qlik Sense server.Note: To be able to run this in Internet Explorer you need to add <meta http-equiv="X-UA-Compatible" content="IE-edge,chrome=1"> to the head section of the _Layout.cshtml file.
Go to the Index.cshtml page.Note: Make sure you have the html-mode selected.
Make some room on the sheet for the visualization object you would like to add.
Drag the visualization object, for example a KPI object, and drop it into the Index.cshtml
- Run the application.
When you are connected to the server, you can insert the boilerplate code that will connect your data visualization objects to the Qlik Sense server.
When you have added your boilerplate you are ready to start using the visualization object from the plugin in the application.
Drag and drop your objects to the head section of the _Layout.cshtml file, straight from the pane under the tree view.