Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i have designed a Web Application in that i have some 20 pages or Web forms
i have used Visual Studio 2005, Code Behind is VB, this My Asp Pages when i Compile Them i get a Compile Time Error Saying :

Description : Name 'ObjectName' is not declared.	 
File        : \BudgetMaster.aspx.vb	
Line        : 12


This error is Showen For Randomly for 1 or many Objects In my Project,

once it Shows 1 error and once it shows 102 errors

my code is Correct when i Run Without Debug i.e ctrl+F5 It wont show any error

Can anyone tell me how to Rectify this Complier Error?



Thanks IN Advance :)
Posted
Updated 22-May-12 9:15am
v2
Comments
Dain Ucak 22-May-12 7:10am    
did you checked your BudgetMaster.aspx.vb line 12.
Diler Patel 22-May-12 7:16am    
ya i checked its not Showing any error and those all Objects are declared have tag runtat="Server" Everything is fine and not only budgetmaster.aspx.vb in all there files also i get this error file and object is not fixed each time i hit run button i get different file name and Different Object name as error
Sebastian T Xavier 22-May-12 7:21am    
can you just post your code from BudgetMaster.aspx.vb
[no name] 22-May-12 8:40am    
Read the question, it doesn't have anything specifically to do with this page so showing the code for it will not help.

The default answer should not be "show me your code"
Diler Patel 22-May-12 8:52am    
My BudgetMaster.aspx File Code


<%@ Page Language="VB" MasterPageFile="~/MainPage.master" AutoEventWireup="false"
CodeFile="BudgetMaster.aspx.vb" Inherits="_BudgetMaster" Title="Budget Master" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register TagPrefix="asp" Namespace="AjaxControlToolKit" Assembly="AjaxControlToolKit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">



<asp:Content ID="Content3" ContentPlaceHolderID="ChildHead" runat="Server">
<div class="HeaderDiv">
<table width="100%">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Cost Centre" CssClass="lblHeader">
<br />


</td>
</tr>
</table>
</div>

<asp:Content ID="Content2" ContentPlaceHolderID="ChildContent" runat="Server">
<div class="childDiv">
<table>
<tr>
<td>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<contenttemplate>
<asp:TabContainer ID="CostceDetails" runat="server" Height="400px" Width="710px"
BackColor="#9E9E9E" SelectedIndex="1" ActiveTabIndex="0">
<asp:TabPanel ID="BMTab1" runat="server" HeaderText="Cost Centre" BackColor="#F0F0F0"
Font-Bold="False">
<contenttemplate>
<asp:Panel ID="BMPan2" runat="server">
<table style="width: 463px;" align="left">
<%--<tr>
<td>
<asp:Label ID="lblnDept_Id" runat="server" CssClass="lblMandotory" Text="Department:">
</td>
<td>
<asp:DropDownList ID="ddlnDept" runat="server" CssClass="txtMandotory" ToolTip="Select Department "
Width="130px" OnSelectedIndexChanged="ddlnDept_SelectedIndexChanged" AutoPostBack="True">

</td>
<td>
<asp:Label ID="lblGlCode1" runat="server" CssClass="lblMandotory" Text="Plant :">
</td>
<td>
<asp:DropDownList ID="ddlnPlant" runat="server" CssClass="txtMandotory"
Width="130px" AutoPostBack="True">

</td>
</tr>--%>
<tr>
<td>
<asp:Label ID="lblGlCode" runat="server" CssClass="lblMandotory" Text="Gl Code:">
</td>
<td>
<asp:DropDownList ID="ddlnGl_Id" runat="server" CssClass="txtMandotory" Width="130px">

Try cleaning the project then doing a complete rebuild, if you haven't already. You may also need to delete the temporary files as described here http://blogs.msdn.com/b/dougste/archive/2008/08/11/clearing-out-temporary-asp-net-files.aspx[^]
 
Share this answer
 
If you get the error on compile, then you should be able to open the Error List window in Visual Studio. The error you have should appear there. If you double click on the error listing, Studio will take you to the place where it encountered the error. It will automatically open the applicable file and set the cursor to the location in the Text Editor where the error has occurred. Try that and a solution to your predicament should be apparent.
 
Share this answer
 
Comments
Diler Patel 23-May-12 1:31am    
ya sir i have tried that also but when i double Click on Error in Error list it takes me to the Place Where Error is Occured But there code is fine it wont show error(A Blue underline on line where Syntax error is). i tried all those things but nothing is working :(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900