Creating ASP.NET MVC example

To create a working ASP.NET MVC example, do the following:

  1. Open Microsoft Visual Studio. Select File > New > Project. The New Project dialog is displayed.

  2. 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.

  3. 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.

  4. Select Views > Shared > _Layout.cshtml in the Solution Explorer.

  5. 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.

  6. 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.
  7. When you have added your boilerplate you are ready to start using the visualization object from the plugin in the application.

  8. Go to the Index.cshtml page.

    Note: Make sure you have the html-mode selected.
  9. 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

  10. Run the application.

Drag and drop your objects to the head section of the _Layout.cshtml file, straight from the pane under the tree view.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?