Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8432525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:09:00+00:00 2026-06-10T06:09:00+00:00

I have the below code: CODE BEHIND: using System; using System.Collections.Generic; using System.Linq; using

  • 0

I have the below code:

CODE BEHIND:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.DataVisualization.Charting;

namespace TestApp2
{
    public partial class hookload : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["Rig_ID"].Equals(1))
                MultiView1.ActiveViewIndex = 0;
            else if (Request.QueryString["Rig_ID"].Equals(2))
                MultiView1.ActiveViewIndex = 1;
            else if (Request.QueryString["Rig_ID"].Equals(3))
                MultiView1.ActiveViewIndex = 2;
            else if (Request.QueryString["Rig_ID"].Equals(4))
                MultiView1.ActiveViewIndex = 3;
            else if (Request.QueryString["Rig_ID"].Equals(5))
                MultiView1.ActiveViewIndex = 4;
        }
    }
}

And this is my aspx file:

<%@ Page Title="Shannons Proof of Concept Rig Dashboard" Language="C#" MasterPageFile="~/Site.master"
    AutoEventWireup="true" CodeBehind="hookload.aspx.cs" Inherits="TestApp2._Default" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:SqlDataSource ID="SqlDataSource27" runat="server" ConnectionString="<%$ ConnectionStrings:RigDashConnectionString1 %>"
                SelectCommand="SELECT TOP (30) tbl_rig.name, tbl_stats.Timestamp AS Expr1, tbl_stats.HookLoad, tbl_stats.Rig_ID FROM tbl_rig INNER JOIN tbl_stats ON tbl_rig.rig_id = tbl_stats.Rig_ID WHERE (tbl_stats.Rig_ID = 2) ORDER BY Expr1 DESC">
            </asp:SqlDataSource>
            <h2>
                Rig Hook Load Stats - Previous 10 minutes</h2>
            <p>
                <asp:Chart ID="Chart25" runat="server" DataSourceID="SqlDataSource27" Width="900px"
                    Height="500px" Style="margin-top: 5px" Palette="EarthTones">
                    <Series>
                        <asp:Series Name="Rig 24 Hook Load" XValueMember="Expr1" XValueType="Time" YValueMembers="HookLoad"
                            Legend="Legend" YValuesPerPoint="1" ChartType="Line">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                            <Area3DStyle Enable3D="True" LightStyle="Realistic" WallWidth="0" />
                        </asp:ChartArea>
                    </ChartAreas>
                    <Legends>
                        <asp:Legend Name="Legend" Title="Legend">
                        </asp:Legend>
                    </Legends>
                </asp:Chart>
            </p>
        </asp:View>
        <asp:View runat="server">
            <asp:SqlDataSource ID="SqlDataSource28" runat="server" ConnectionString="<%$ ConnectionStrings:RigDashConnectionString1 %>"
                SelectCommand="SELECT TOP (30) tbl_rig.name, tbl_stats.Timestamp AS Expr1, tbl_stats.HookLoad, tbl_stats.Rig_ID FROM tbl_rig INNER JOIN tbl_stats ON tbl_rig.rig_id = tbl_stats.Rig_ID WHERE (tbl_stats.Rig_ID = 3) ORDER BY Expr1 DESC">
            </asp:SqlDataSource>
            <h2>
                Rig Hook Load Stats - Previous 10 minutes</h2>
            <p>
                <asp:Chart ID="Chart26" runat="server" DataSourceID="SqlDataSource28" Width="900px"
                    Height="500px" Style="margin-top: 5px" Palette="EarthTones">
                    <Series>
                        <asp:Series Name="Rig 21 Hook Load" XValueMember="Expr1" XValueType="Time" YValueMembers="HookLoad"
                            Legend="Legend" YValuesPerPoint="1" ChartType="Line">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                            <Area3DStyle Enable3D="True" LightStyle="Realistic" WallWidth="0" />
                        </asp:ChartArea>
                    </ChartAreas>
                    <Legends>
                        <asp:Legend Name="Legend" Title="Legend">
                        </asp:Legend>
                    </Legends>
                </asp:Chart>
            </p>
        </asp:View>
        <asp:View runat="server">
            <asp:SqlDataSource ID="SqlDataSource29" runat="server" ConnectionString="<%$ ConnectionStrings:RigDashConnectionString1 %>"
                SelectCommand="SELECT TOP (30) tbl_rig.name, tbl_stats.Timestamp AS Expr1, tbl_stats.HookLoad, tbl_stats.Rig_ID FROM tbl_rig INNER JOIN tbl_stats ON tbl_rig.rig_id = tbl_stats.Rig_ID WHERE (tbl_stats.Rig_ID = 5) ORDER BY Expr1 DESC">
            </asp:SqlDataSource>
            <h2>
                Rig Hook Load Stats - Previous 10 minutes</h2>
            <p>
                <asp:Chart ID="Chart27" runat="server" DataSourceID="SqlDataSource29" Width="900px"
                    Height="500px" Style="margin-top: 5px" Palette="EarthTones">
                    <Series>
                        <asp:Series Name="Rig 22 Hook Load" XValueMember="Expr1" XValueType="Time" YValueMembers="HookLoad"
                            Legend="Legend" YValuesPerPoint="1" ChartType="Line">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                            <Area3DStyle Enable3D="True" LightStyle="Realistic" WallWidth="0" />
                        </asp:ChartArea>
                    </ChartAreas>
                    <Legends>
                        <asp:Legend Name="Legend" Title="Legend">
                        </asp:Legend>
                    </Legends>
                </asp:Chart>
            </p>
        </asp:View>
    </asp:MultiView>
    <p>
        <a href="..\default.aspx">< Go Back</a>
    </p>
</asp:Content>

Now my problem is that when I try to run this, I get the message ‘The name ‘MultiView1′ does not exist in the current context’. I really don’t understand why I am getting this error, but I am also a noob so it isn’t surprising. 🙂 Basically, I have a asp:gridview table on the first page and I am trying to pass parameters to then be processed by this page so when someone clicks the link for ~\charts\hookload.aspx?Rig_ID=2, it processes MultiView Index 1 so it displays a chart of relevant data as described by the SQL Query.

This has been the only way I have found so far to do this so if anyone else has a better idea, believe me I am all ears. I have struggled to locate an answer to this, mainly because I don’t know what keywords to search for. Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:09:02+00:00Added an answer on June 10, 2026 at 6:09 am

    Inherits attribute of your page must refer to name of your backing class.

    Correct your Inherits as follows:

    <%@ Inherits="TestApp2.hookload" Page Title="Shannons Proof of Concept Rig Dashboard" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="hookload.aspx.cs"  %>
    

    Happens when you change a class name and forget to correct it in the aspx file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a list collection like below : using System; using System.Collections.Generic; using System.Linq;
I have below code behind in c# if (Session[cmpDictionaryTitle]!= null) { downloadLinks.Text += @<li><a
i am using a JavaScript and it have the below code: <script type=text/javascript> var
I have below code: <a href=# id=@item.Id name=vote ><img src=/Content/images/021.png style=float:left alt= /></a> which
I have below code: class Program { static void Main(string[] args) { Task[] tasks
I have below code in html. <li class=selected runat=server id=lihome><a href=/ISS/home.aspx title=Home><span>Home</span></a></li> Now I
I have below code to insert a style into DOM (there is a use
I have below code.The logic here is if HostList conatains any blanck entry it
I have below code which overrides equals() and hashcode() methods. public boolean equals(Object obj)
I have below code snippet SimpleDateFormat dateFormat = new SimpleDateFormat( yyyy-MM-dd hh:mm:ss.SSS); String processedContentDate=2012-04-10

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.