在vs2005中的代码中找不到asp.net控件 [英] asp.net control not found in code behind in vs2005
本文介绍了在vs2005中的代码中找不到asp.net控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
iam在vs 2005上工作
i添加了一个带有id名称的控制无线电按钮和runat服务器
但它显示错误
rdbtn在当前上下文中不存在
解决方案
首先尝试清理并重建解决方案。
如果问题仍然存在,请转到Page的designer.cs并检查RadioButton是否存在。您甚至可以尝试删除特定的设计器代码文件,然后通过右键单击SolutionExplorer中的WebPage文件再次生成它,选择转换为WebApplication。然后重建。
错误很明显:
< asp:radiobuttonlist id = RadioCoupon runat = server cssclass = nobg repeatdirection = 水平 xmlns:asp = #unknown > < / asp:radiobuttonlist >
更改IDRadioCoupon
到rdbtn
。
清理解决方案然后再次构建。另外发布.cs部分。
iam working on vs 2005
i have added a control radiobutton with id name with runat server
but it shows error
rdbtn does not exist in current context
解决方案
First try to Clean and Rebuild the Solution.
If problem still exists go the designer.cs of the Page and check whether the RadioButton exists there. You can even try to remove the particular designer code file and generate it once again by Right click on the WebPage file from the SolutionExplorer, choose "Convert to WebApplication". Then Rebuild.
The error is clear enough:
<asp:radiobuttonlist id="RadioCoupon" runat="server" cssclass="nobg" repeatdirection="Horizontal" xmlns:asp="#unknown"></asp:radiobuttonlist>
Change the IDRadioCoupon
tordbtn
.
Clean up the solution then build again.otherwise post you .cs part too.
这篇关于在vs2005中的代码中找不到asp.net控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文