This project is read-only.

DotNet Highcharts with ASPX (MVC)

Jul 3, 2014 at 8:12 PM
Dear Community,

i have a problem. I tried to use Highcharts. I downloaded the Files as shown at

I tried it with the MVC4 Razor - No Problems, I tried it then with MVC4 and ASPX - Nothing. Just a white page. So I have a Master page with the correct Stylesheets and my "Index.aspx" in my View-Folder. What can I do to fix that?

Here is the code for my Index.aspx view
 <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">

    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


        <asp:Literal ID="ltrChart" runat="server"></asp:Literal>


    <asp:Content ID="Content3" ContentPlaceHolderID="FeaturedContent" runat="server">

    <asp:Content ID="Content4" ContentPlaceHolderID="ScriptsSection" runat="server">
And here is my masterpage
 <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
    <!DOCTYPE html>
    <html lang="de">
        <head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
            <meta charset="utf-8" />
            <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
            <link href="<%: Url.Content("~/favicon.ico") %>" rel="shortcut icon" type="image/x-icon" />
            <meta name="viewport" content="width=device-width" />
            <%: Styles.Render("~/Content/css") %>
            <%: Scripts.Render("~/bundles/modernizr") %>

            <script src="../../Scripts/jquery-1.8.2.min.js"></script>
            <script src="../../Scripts/jquery-1.8.2.js"></script>

            <script src="../../Scripts/Highcharts-4.0.1/js/highcharts.js"></script>
                <div class="content-wrapper">
                    <div class="float-left">
                        <p class="site-title"><%: Html.ActionLink("Ihr Logo hier einfügen", "Index", "Home") %></p>
                    <div class="float-right">
                        <section id="login">
                            <%: Html.Partial("_LoginPartial") %>
                            <ul id="menu">
                                <li><%: Html.ActionLink("Startseite", "Index", "Home") %></li>
                                <li><%: Html.ActionLink("Info", "About", "Home") %></li>
                                <li><%: Html.ActionLink("Kontakt", "Contact", "Home") %></li>
                                <li><%: Html.ActionLink("Class A", "Index", "AisClassAPositionReport", new { area = "Statistics" }, null)%></li>
                                 <li><%: Html.ActionLink("Graphic", "Index", "Visualisation", new { area = "Statistics" }, null)%></li>
            <div id="body">
                <asp:ContentPlaceHolder ID="FeaturedContent" runat="server" />
                <section class="content-wrapper main-content clear-fix">
                    <asp:ContentPlaceHolder ID="MainContent" runat="server" />
                <div class="content-wrapper">
                    <div class="float-left">
                        <p>&copy; <%: DateTime.Now.Year %> - Meine ASP.NET MVC-Anwendung</p>

            <%: Scripts.Render("~/bundles/jquery") %>
            <asp:ContentPlaceHolder ID="ScriptsSection" runat="server" />
And last but not least my controller (works fine with Razor)
   public ActionResult Index()

                DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts("chart")
                        .SetXAxis(new XAxis
                            Categories = new[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }
                        .SetSeries(new Series
                            Data = new Data(new object[] { 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4 })
So if somebody can help me - that would be awesome!