Take the 2-minute tour ×

I am getting a number of errors such as

The name 'lblThankYou' does not exist in the current context

However the asp.net code has the 'lblThankYou' as a label name

<asp:Label ID="lblThankYou" runat="server" Visible="False" Font-Bold  Font-Size ="Medium" ><table><tr><td>Thank you for submitting your request.  We will respond the following business day.  
                        For immediate assistance, please call us at 1-800-xxx-xxxx.</tr></table></asp:Label>

However when I try to preview the file in the browser I get this


Parser Error Message: Could not load type 'xxxxxxxxxxxxSolution2010.Signup3'.

Source Error:

Line 1: <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageLicensing.master" AutoEventWireup="true" CodeBehind="Signup3.aspx.cs" Inherits="xxxxxxxxxxxSolution2010.Signup3" %> Line 2: Line 3:

Source File: /Signup3.aspx Line: 1

The odd thing is the code is there in the page and I tried rebuilding it to fix it but to no avail

I am using ASP.net 4.0 and visual studio 2010 if that helps

share|improve this question

closed as too localized by casperOne Dec 17 '11 at 0:49


what happens if you run the web application normally (with F5)? –  ibram May 12 '11 at 19:21

2 Answers 2

Your table cell is missing a closing tag

share|improve this answer
sorry thats not the case since i just copied part of the code –  Mervin Johnsingh May 12 '11 at 18:32
You have an open <TD> tag, and the next closing tag is a </TR> tag. <tr><td>...</tr> See your code snippet above. The code that you pasted into your questions can and should cause errors. –  George W Bush May 12 '11 at 19:20
up vote 0 down vote accepted

Well the way I fixed it was by creating a new code file and copying the existing code on to it and saving it with the same old file name.

That fixed the issue

share|improve this answer
Do you have a theory as to what was causing the error? –  this.josh May 18 '11 at 17:40
This.josh ,I dont really have a theory about it sorry .I thought it was something to do with the way the visual studio handles rebuilds but I couldnt find any documentation on the internet which supports it.However its a workaround which seems to fix the issue just in case someone is breaking their heads over it –  Mervin Johnsingh May 18 '11 at 17:51
