2011-05-12 46 views
0

不是一个标签名称或文本框的ID我收到了许多这样的错误作为收到错误有关的上下文

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

然而,asp.net代码有“lblThankYou”作为标签名称

<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> 

然而,当我尝试预览在浏览器中的文件,我得到这个

Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

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

奇怪的是与c颂歌是那里的网页,我试图重建它解决它,但无济于事

我使用ASP.net 4.0和Visual Studio 2010,是否可以帮助

+0

如果您正常运行Web应用程序(使用F5),会发生什么情况? – ibram 2011-05-12 19:21:43

回答

0

那么我修复它的方式是创建一个新的代码文件并将现有的代码复制到它并使用相同的旧文件名保存它。

修复了问题

+0

你有什么理由导致错误? – 2011-05-18 17:40:23

+0

This.josh,我真的没有一个关于它的理论对不起。我认为这是与视觉工作室处理重建的方式有关,但我无法在互联网上找到任何支持它的文档。但是,它似乎是一种解决方法解决这个问题只是为了防止有人对此感到头疼 – 2011-05-18 17:51:22

0

你的表格单元格中缺少结束标记

+0

对不起,因为我刚刚复制了部分代码 – 2011-05-12 18:32:34

+0

您有一个开放的标记,并且下一个结束标记是标记。 ​​...查看上面的代码片段。您粘贴到问题中的代码可能会导致错误。 – 2011-05-12 19:20:35

相关问题