未声明'TextBox1'。由于其保护级别,它可能无法访问 [英] 'TextBox1' is not declared. It may be inaccessible due to its protection level
本文介绍了未声明'TextBox1'。由于其保护级别,它可能无法访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是ASP.net 4.5的新手
我试图剪切并粘贴4.0程序,我发现4.5不喜欢TextBoxes。
它在Default.aspx.designer.vb中使用Protected WithEvents声明textbox1。
如何修复这个错误在4.5中所以我可以使用文本框。
错误代码:
I am new to ASP.net 4.5
I tried to cut and paste a 4.0 program and I found out That 4.5 does not like TextBoxes.
It declares textbox1 in Default.aspx.designer.vb with "Protected WithEvents".
How do I fix this error in 4.5 so I can use the textboxes.
Error Code:
'TextBox1' is not declared. It may be inaccessible due to its protection level
,它可能无法访问。
推荐答案
.NET 4.5根本不介意TextBoxes:它只是说那里在您的应用程序中没有名为TextBox1的TextBox。
检查Default.apsx页面并确保它包含一个具有该名称的TextBox,并声明它已声明asrunat =server
.NET 4.5 does not mind TextBoxes at all: It is just saying that there is no TextBox called "TextBox1" in your application.
Check your Default.apsx page and make sure that it contains a TextBox with that name, and that it is declared asrunat="server"
这篇关于未声明'TextBox1'。由于其保护级别,它可能无法访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文