固定“名称在当前上下文中不存在". Web Developer Express中的错误 [英] Fixing "name does not exist in the current context" errors in Web Developer Express

查看:73
本文介绍了固定“名称在当前上下文中不存在". Web Developer Express中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

名称lblorder在当前上下文标签中不存在

The name lblorder does not exist in the current context label

<asp:Label ID="lblorder" runat="server" Text="Ordernumber: "></asp:Label>

后面的代码

string test = lblorder.Text;

讨厌此错误. 偶尔,它会弹出,我知道这与删除aspx.designer.cs并重建页面或解决方案文件有关,但是我在Visual Web Developer 2008 Express Edition中工作,而我没有这个aspx.designer .cs文件

I hate this error. Once in a while it just pops up and I know that it has something to do with deleting the aspx.designer.cs and rebuilding the page or solution file but I work in Visual Web Developer 2008 Express Edition and I dont have this aspx.designer.cs file

..帮助我..

推荐答案

您始终可以打开Visual Studio解决方案并为文件添加xml.

You could always open the visual studio solution and add the xml for the file.

<Compile Include="blahblah\blahblah.ascx.cs">
  <DependentUpon>blahblah.ascx</DependentUpon>
</Compile>

这篇关于固定“名称在当前上下文中不存在". Web Developer Express中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆