DropDownList的不宣。它可能无法访问由于其保护级别 [英] dropdownlist is not declared. It may be inaccessible due to its protection level
本文介绍了DropDownList的不宣。它可能无法访问由于其保护级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你可以从注释掉code看到的,我试图让该模型通过下拉菜单 + selCurrentManuf.Text
受到影响。
我得到这个错误
selCurrentManuf'未声明。它可能无法访问由于其保护水平。
块引用>这又如何解决呢?
我可以向下访问降在这样的页面的另一部分。
昏暗sc1_currentmanuf的String = CTYPE(e.Item.FindControl(selCurrentManuf),DropDownList的)。文本
不过在功能我想使用selCurrentManuf没有获得电子
解决方案昏暗sc1_currentmanuf的String = CTYPE(dlContacts.Items(0).FindControl(selCurrentManuf),DropDownList的)。文本
昏暗更改为MyQuery作为字符串=SELECT * FROM c5_model,其中c5_manufid =+ sc1_currentmanufAs you can see from the commented out code, I'm trying to get the model dropdown be affected by
+ selCurrentManuf.Text
.I get this error
'selCurrentManuf' is not declared. It may be inaccessible due to its protection level.
How can this be solved?
I can access the drop down in another part of the page like this..
Dim sc1_currentmanuf As String = CType(e.Item.FindControl("selCurrentManuf"), DropDownList).Text
However in the function i am trying to use selCurrentManuf does not have access to e
解决方案Dim sc1_currentmanuf As String = CType(dlContacts.Items(0).FindControl("selCurrentManuf"), DropDownList).Text Dim myQuery As String = "SELECT * FROM c5_model where c5_manufid = " + sc1_currentmanuf
这篇关于DropDownList的不宣。它可能无法访问由于其保护级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文