# Quick Start: Configure DsDataViewer

## Content

The steps below describe how to create a simple ASP.NET Core web application that uses DsDataViewer to view data files.

1. Open Microsoft Visual Studio and select **Create a new project \| ASP\.NET Core Web App** and name it. In this example, we have named it as “**DsDataViewerApp**”.
    ![create-asp-web-core.png](https://cdn.mescius.io/document-site-files/images/77f9d681-95d7-4f74-af2f-a469fd8f61a7/create-asp-web-core.75f22a.png)
2. Open the project in File Explorer and locate the **wwwroot > lib** directory.
3. Right-click on **lib** folder and select **Open in Terminal**. Run the following command to install **DsDataViewer**. 
    `npm install @mescius/dsdataviewer`
4. Observe that **DsDataViewer** gets installed at following location:
    `DsDataViewerApp\wwwroot\lib\node_modules\@mescius\dsdataviewer`
5. In Solution Explorer, right click **wwwroot** folder of the project and select **Add > New Item** to add a new HTML file named '**index.html**'.
6. To initialize **DsDataViewer**, add the following code to index.html.

    ```javascript
    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <meta charset="utf-8">
        <meta name="description" content="Document Solutions Data Viewer">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes" />
        <script type="text/javascript" src="lib/node_modules/@mescius/dsdataviewer/dsdataviewer.js"></script>
    
        <title>Document Solutions Data Viewer</title>
        <script>
            function loadDataViewer(selector) {
                //DsDataViewer.LicenseKey = 'your_license_key';
                var viewer = new DsDataViewer(selector, {});
            }</script>
        <link rel="stylesheet" type="text/css" href="css/style.css">
    </head>
    
    <body onload="loadDataViewer('#root')">
        <div id="root" class="dsdataviewer"></div>
    </body>
    
    
    </html>
    ```
7. In Visual Studio, add a new stylesheet 'style.css' in wwwroot/css folder of the project and add following code.
    ![gcdataviewer-style](https://cdn.mescius.io/document-site-files/images/77aa80c3-f355-4bb9-824d-5ac18e5eee50/gcdataviewer-style.749836.png)

    ```css
    .dsdataviewer {
        height: 100%;
    }
    ```
8. To start the application with **index.html** by default, in **Program.cs** file, replace the default methods with following code.

    ```csharp
    var builder = WebApplication.CreateBuilder(args);
    
    // Add services to the container.
    builder.Services.AddRazorPages();
    
    var app = builder.Build();
    
    // Configure the HTTP request pipeline.
    if (!app.Environment.IsDevelopment())
    {
        app.UseExceptionHandler("/Error");
    }
    
    app.UseHttpsRedirection();
    app.UseDefaultFiles();
    app.UseStaticFiles();
    app.UseRouting();
    app.UseAuthorization();
    app.MapRazorPages();
    app.Run();
    ```
9. Build and run the application. A page displaying **DsDataViewer** opens in your default browser.
    ![gcdataviewer.png](https://cdn.mescius.io/document-site-files/images/77f9d681-95d7-4f74-af2f-a469fd8f61a7/gcdataviewer.6c1648.png)
10. User can use **Open document** button(![open.png](https://cdn.mescius.io/document-site-files/images/77f9d681-95d7-4f74-af2f-a469fd8f61a7/open.ce255e.png)) on the top-left of the DsDataViewer control to open a file.
    ![quick-start-final.png](https://cdn.mescius.io/document-site-files/images/77f9d681-95d7-4f74-af2f-a469fd8f61a7/quick-start-final.436c97.png)

For more information, see [Load a File](/document-solutions/javascript-data-viewer/docs/load-a-file).