Parser error when trying to generate gauge chart
<p>I'm trying to generate a gauge chart based on changing MTBF values, However when I run the webapplication, I get the error </p>

<p>Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.</p>

<p>Parser Error Message: 'WebApplication1.WebForm3' is not allowed here because it does not extend class 'System.Web.UI.Page'.</p>

<p>Source Error:</p>

<p>Line 1:<br>
Line 2:  &lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="WebApplication1.WebForm3" %>
Line 3:<br>
Line 4:  </p>

<p>Source File: /WebForm3.aspx    Line: 2 </p>

<p>THe code that i have used is as follows, </p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebApplication1 : System.Web.UI.Page
    {



        protected void Page_Load(object sender, EventArgs e)
        {



        }

        protected void Button1_Click(object sender, EventArgs e)
        {


            using (Testme entities = new Testme())
            {



                var execution = entities.TestExecutionDetails.Where(p =&gt; p.TestExecutionID == TestExecID).Select(p =&gt; p).OrderBy(p =&gt; p.StartTime).ToArray();
                var failures = entities.TestExecutionDetails.Select(p =&gt; p.Result != "Pass      ").Count();

                var uptime = entities.TestExecutionDetails.Where(p =&gt; p.Result == "Pass          ").Select(p =&gt; p);
                TimeSpan elapsedDuration = new TimeSpan(0);
                foreach (var p in uptime)
                {

                    elapsedDuration += (p.EndTime.Value - p.StartTime.Value);

                }
                var mtbfdisplay = elapsedDuration.TotalSeconds / failures;


                string str1 = @"

        data = google.visualization.arrayToDataTable([";

                string str2 = @"['Label', 'Value'],['MTBF'," + mtbfdisplay + @"],]);";

                string str3 = @"var options = {
                width: 400, height: 120, redFrom: 90, redTo: 100, yellowFrom: 75, yellowTo: 90, minorTicks: 5
            };


                var chart = new google.visualization.gauge(document.getelementbyid('chart-success'));
                chart.draw(data, options);";

                string postData = str1 + str2 + str3;

                Console.WriteLine(postData);


                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "test", postData, true);

            }


        }
    }
}
</code></pre>

<p>The aspx code is as follows </p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="WebApplication1.WebForm3" %&gt;

&lt;!DOCTYPE html&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
        &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt;

        &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
        &lt;/asp:ScriptManager&gt;
        &lt;asp:Label ID="Label2" runat="server" Text="1"&gt;&lt;/asp:Label&gt;
                &lt;br /&gt;
    &lt;div&gt;
        &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
            &lt;ContentTemplate&gt;

                &lt;asp:HiddenField ID="HiddenField1" runat="server" Value="1" /&gt;
                &lt;br /&gt;

                &lt;asp:Label ID="Label1" runat="server" Text="1"&gt;&lt;/asp:Label&gt;
                &lt;br /&gt;

                &lt;asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /&gt;

                &lt;div id="chart-success"&gt;&lt;/div&gt;

            &lt;/ContentTemplate&gt;


        &lt;/asp:UpdatePanel&gt;
    &lt;/div&gt;


    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I'm really stuck, I don't even know if this is the right approach to generate the charts, please help.</p>

<p>Thanks</p>
