Solved

copied ASP.net project giving is not declared errors everywhere

Posted on 2010-08-24
14
348 Views
Last Modified: 2013-11-07
Please bear with me; I’m a generalist and not a web developer. I have to enhance ASPX code that I didn’t write and  know nothing about… of course the developer is no longer her and there are no comments whatsoever.
I copied over the entire project from the server, brought the project into VS 2008 and the main problem is everything is not declare, event the functions in the VB files. I added System.Web.Extensions to my reference it helped some. I just have no clue as to why every label and function is undeclared in the aspx.vb files.

Here’s one of the ASPX page :
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RAList.aspx.vb" Inherits=".RAList" MasterPageFile="~/RA.Master" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPH" runat="Server">

    <script type="text/javascript">
    function ChangeBlurColor(Field) {
        var i1 = window.document.getElementById(Field);
        i1.style.backgroundColor = "FFFFFF";
    }
    function ChangeAltBlurColor(Field) {
        var i1 = window.document.getElementById(Field);
        i1.style.backgroundColor = "FFFF99";
    }
</script>

    <asp:ScriptManager ID="ScriptManager" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <div>
                <asp:Table ID="tblNav" runat="server" style="width: 7.65in">
                    <asp:TableRow>
                        <asp:TableCell HorizontalAlign="Center">
                            <a href="../cfm_Members/pg_login.cfm?">Logout</a> &nbsp;&nbsp;
                            <a href="javascript:OpenSiteMap()">Site Map</a> &nbsp;&nbsp;
                            <a href="../cfm_Members/pg_Home.cfm?">Home</a> &nbsp;&nbsp;
                            <asp:HyperLink ID="HyperLink1" NavigateUrl="javascript:OpenListHelp()" runat="server">Help</asp:HyperLink>
                        </asp:TableCell>
                    </asp:TableRow>
                </asp:Table>
                <table style="width: 7.65in; height: 1px;">
                    <tr>
                        <td align="center">
                            <asp:Label ID="lblTitle" runat="server" Font-Bold="True" Font-Size="Large" Text="Return Authorization Requests"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <asp:GridView ID="grdHeader" runat="server" AllowPaging="True"
                                AutoGenerateColumns="False" AutoGenerateSelectButton="True"
                                BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px"
                                CellPadding="2" ForeColor="Black" PagerSettings-Mode="NumericFirstLast"
                                PageSize="5">
                                <PagerSettings Mode="NumericFirstLast" />
                                <FooterStyle BackColor="Tan" />
                                <Columns>
                                    <asp:BoundField DataField="ReturnAuthorizationHeaderUID" HeaderText=""
                                        ShowHeader="False">
                                        <ControlStyle Width="0px" />
                                        <FooterStyle Width="0px" />
                                        <HeaderStyle Width="0px" />
                                        <ItemStyle Width="0px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="RANumber" HeaderText="RA Number" />
                                    <asp:BoundField DataField="RADate" HeaderText="RA Date" />
                                </Columns>
                                <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
                                    HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#CC9900" ForeColor="GhostWhite" />
                                <HeaderStyle BackColor="Tan" Font-Bold="True" />
                                <AlternatingRowStyle BackColor="PaleGoldenrod" />
                            </asp:GridView>
                            <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Large" Text="List of current RA's"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            &nbsp;</td>
                    </tr>
                </table>
                <table style="width: 7.65in">
                    <tr>
                        <td align="center">
                            <asp:GridView ID="grdDetail" runat="server" BackColor="LightGoldenrodYellow" BorderColor="Tan"
                                BorderWidth="1px" CellPadding="2" ForeColor="Black" AllowPaging="True" AutoGenerateColumns="False">
                                <FooterStyle BackColor="Tan" />
                                <Columns>
                                    <asp:BoundField DataField="SerialNumber" HeaderText="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serial #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
                                        ReadOnly="True">
                                        <HeaderStyle Wrap="False" />
                                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Wrap="False" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ItemNumber" HeaderText="&nbsp;&nbsp;&nbsp;Item #&nbsp;&nbsp;&nbsp;"
                                        ReadOnly="True">
                                        <HeaderStyle Wrap="False" />
                                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Brand" HeaderText="Brand" ReadOnly="True">
                                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Model" HeaderText="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Model&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
                                        ReadOnly="True">
                                        <HeaderStyle Wrap="False" />
                                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                </Columns>
                                <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#CC9900" ForeColor="GhostWhite" />
                                <HeaderStyle BackColor="Tan" Font-Bold="True" />
                                <AlternatingRowStyle BackColor="PaleGoldenrod" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
                <table style="width: 7.76in">
                    <tr>
                        <td align="center">
                            <asp:Label ID="lblErrorMessage" runat="server" Text="Error Message" CssClass="ErrorMessage"
                                Height=".20in"></asp:Label>
                        </td>
                    </tr>
                </table>
                <table style="width: 7.65in">
                    <tr style="padding: 0px; margin: 0px">
                        <td align="center">
                            <asp:RadioButton ID="optAll" runat="server" AutoPostBack="True" Text="All RA's" GroupName="RAOptions"
                                Checked="True" />
                            <asp:RadioButton ID="optGood" runat="server" AutoPostBack="True" Text="Current Stocked Only"
                                GroupName="RAOptions" />
                            <asp:RadioButton ID="optDamaged" runat="server" AutoPostBack="True" Text="Damaged/Defective Only"
                                GroupName="RAOptions" />
                            <asp:RadioButton ID="optNonStocked" runat="server" AutoPostBack="True" Text="Special Order Only"
                                GroupName="RAOptions" />
                            <asp:RadioButton ID="RadioButton1" runat="server" AutoPostBack="True" Text="A/C Only"
                                GroupName="RAOptions" />                                
                        </td>
                    </tr>
                </table>
                <table style="width: 7.76in">
                    <tr style="padding: 0px; margin: 0px">
                        <td id="tdValidate" align="center" style="padding: 0px; margin: 0px">
                            <asp:Button ID="btnView" runat="server" BackColor="#FFCC66" Text="View Selected RA"
                                Width="350px" />
                        </td>
                    </tr>
                    <tr style="padding: 0px; margin: 0px">
                        <td align="center" style="padding: 0px; margin: 0px">
                            <asp:Button ID="btnGood" runat="server" BackColor="#FFCC66" Text="Create A Current Stock Models RA"
                                 Width="350px" />
                        </td>
                    </tr>
                    <tr style="padding: 0px; margin: 0px">
                        <td align="center" style="padding: 0px; margin: 0px">
                            <asp:Button ID="btnDamaged" runat="server" BackColor="#FFCC66" Text="Create A Damaged Defective Items DRA"
                                 Width="350px" />
                        </td>
                    </tr>
                    <tr style="padding: 0px; margin: 0px">
                        <td align="center" style="padding: 0px; margin: 0px">
                            <asp:Button ID="btnNonStock" runat="server" BackColor="#FFCC66" Text="Create A Non-WHSE Stocked Special Order Items NRA"
                                 Width="350px" />
                        </td>
                    </tr>
                    <tr style="padding: 0px; margin: 0px">
                        <td align="center" style="padding: 0px; margin: 0px">
                            <asp:Button ID="Button1" runat="server" BackColor="#FFCC66" Text="Create A/C CRA"
                                 Width="350px"  />
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

----------------------------------------------------------------------
Here’s the top of one of my  aspx.VB page
Option Explicit On
Option Strict On

Imports System.Data.SqlClient
Imports System.data
Imports System



Partial Public Class RAList

    Inherits System.Web.UI.Page
----------------------------------------------------------------------


Do I need another reference for this project? What am I missing…any ideas anyone?

Thanks
CJ
0
Comment
Question by:cin_champ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
14 Comments
 
LVL 9

Expert Comment

by:wellhole
ID: 33515885
Build the website. Turn off the warnings. Read the errors. Whatever references are being complained about, reference it. For example, this page requires the ajaxcontroltoolkit and the system.web.extensions references. The former is hopefully included in your project files as a dll binary. Otherwise, you have to google and download it.
0
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 33519930
make sure you copy the whole projects
also make sure .net framework is installed on ur machine
and re build the solution
0
 

Author Comment

by:cin_champ
ID: 33521789
Thanks to you both for you responses, but I'm still getting 147 errors. I've attached them in an xlsl file.

King2002,
Which  version of Framework should I have? and what exactly do I need to check? the machine I have is not the developer's machine...

Thanks
Cin
ASPneterrors.xlsx
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 9

Expert Comment

by:wellhole
ID: 33521815
Your file type is too modern. I can't read it.
0
 

Author Comment

by:cin_champ
ID: 33522171
PS: you can download a compatibility pack from Microsoft. But here's a .xls file
ASPneterrors.xls
0
 
LVL 9

Expert Comment

by:wellhole
ID: 33522245
Absolutely, I can. I just don't want to. More software = more files = more registry = more slower.

See error #4 - Reference to a non-shared member requires an object reference.

Click it and see what that's about and add the necessary reference to your project. Recompile and do the next one.
0
 

Author Comment

by:cin_champ
ID: 33524723
wellhole,

The error is on this line:
        ScriptManager.SetFocus("ctl00_CPH_txtItem1")

I'm searching online but have not found what to add to my project to get this to work...
Any idea?

Thanks
Cin
0
 
LVL 9

Expert Comment

by:wellhole
ID: 33524741
ScriptManager belongs to AjaxControlToolkit. I know my very first post asks you to reference that.
0
 
LVL 9

Expert Comment

by:wellhole
ID: 33524755
Sorry, I could be wrong. Likely you have to reference something along the lines of System.Web, System.Web.UI, System.Web.Extensions.
0
 

Author Comment

by:cin_champ
ID: 33525205
Wellhole,

In the project I added System.web. Still not working...

Yes I do I have AjaxControlToolkit.dll and AjaxControlToolkit.pdb. But do I  need to do anything else? Like register the dll or something?

I dont have System.Web.UI under references, could this be my problem?

Thanks Again
Cin
0
 

Author Comment

by:cin_champ
ID: 33532334
Dear Experts,
On my machine I have :
Microsoft.NET\Framework\v2.0.50727

If I look in 'add remove programs' I have:
Microsoft net compact framework 2  SP2
Microsoft net compact framework 3.5
Microsoft net Framework 1.1
Microsoft net Framework 2.0 Service pack 2
Microsoft net Framework 3.0 Service pack 2
Microsoft net Framework 3.3 Service pack 1
Microsoft ASP.net  2.0 Ajax extensions 1.0

Am I missing some software? service pack?
Thanks
Cin

0
 

Author Comment

by:cin_champ
ID: 33579950
Wellhole,

Got somewhere finally today. Started from scratch and downloaded an older Ajaxt tool kit and added the 2 references for System.Web.Extensions and System.Web.Extensions.Design. Got rid of most of my errors.

Just need a little more help with one more thing, there's a VB class (DataLayer) who's functions are used in almost every module, the project is not recongnizing them (no intellisense) . The file is in the folder do I need to do anything to get the functions  to be recongnize inside my project?  

PS: Just to remind you I copied the folder from the Live server and am trying to get it to run on my own machine to make some changes....

Thanks
Cin
0
 
LVL 9

Accepted Solution

by:
wellhole earned 250 total points
ID: 33580047
Typically, to add a class to a .net web project you put the .vb file in the App_Code folder, hit refresh in the solution explorer, right click the file, select include in project, and rebuild the website.

Classes in the App_Code folder are accessible from any page on the website.
0
 

Author Closing Comment

by:cin_champ
ID: 33581139
Wellhole,

I was finally able to build the site  I had to exclude the 2 web pages where I'm getting over 200 errors and will try to figure out what's wrong with those 2 pages tomorrow.

Thank You for your help!
Cin
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question