构建解决方案时控制母版页中的错误 [英] control error in master page when build solution

查看:64
本文介绍了构建解决方案时控制母版页中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用



I use

<div id="logoff" runat="server">
                                    <a class="logoff" id="loggmeof" href="#">LogOff</a>
                                </div>






主页中的
,以及page_load,如果给出

logoff .Visible = false;





当我在visual studio 2008中构建时,它会给出未找到的注销错误



然后当我发表评论时,它表示构建成功





in master page , and in page_load , if give
logoff.Visible = false;


and when i build in visual studio 2008 , it gives error for logoff not found

then when i comment it out , it says build successfull

推荐答案

当设计师页面内容为没有在设计器文件中更新......

试试这样。



1)从ASPX页面删除控件。 。

2)保存母版页

3)尝试创作使用相同的ID控制相同的控件

3)保存母版页..




现在你尝试编写代码背后..它应该工作..
It happens many times, when the designer page content is not updated in the designer file...
Try like this.

1)delete the control from the ASPX page..
2) Save the master page
3) Try creating the same control with same ID
3) save the master page..


now you try to code in code behind.. it should work..


这篇关于构建解决方案时控制母版页中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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