• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 363
  • Last Modified:

copied ASP.net project giving is not declared errors everywhere

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
cin_champ
Asked:
cin_champ
  • 7
  • 6
1 Solution
 
wellholeCommented:
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
 
Kamal KhaleefaInformation Security SpecialistCommented:
make sure you copy the whole projects
also make sure .net framework is installed on ur machine
and re build the solution
0
 
cin_champAuthor Commented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
wellholeCommented:
Your file type is too modern. I can't read it.
0
 
cin_champAuthor Commented:
PS: you can download a compatibility pack from Microsoft. But here's a .xls file
ASPneterrors.xls
0
 
wellholeCommented:
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
 
cin_champAuthor Commented:
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
 
wellholeCommented:
ScriptManager belongs to AjaxControlToolkit. I know my very first post asks you to reference that.
0
 
wellholeCommented:
Sorry, I could be wrong. Likely you have to reference something along the lines of System.Web, System.Web.UI, System.Web.Extensions.
0
 
cin_champAuthor Commented:
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
 
cin_champAuthor Commented:
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
 
cin_champAuthor Commented:
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
 
wellholeCommented:
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
 
cin_champAuthor Commented:
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now