开发者

cannot access protected member ... without a python subclass of

开发者 https://www.devze.com 2023-01-14 23:05 出处:网络
bt_volver is a System.Web.UI.webcontrols.button and it\'s just a code it used to work fine in 2.0 IronPython 2.6.911.0 in ASP.NET webforms

bt_volver is a System.Web.UI.webcontrols.button and it's just a code it used to work fine in 2.0

IronPython 2.6.911.0 in ASP.NET webforms 
Visual Studio 2008 Professional 9.0.30729.1 SP

 开发者_StackOverflowcannot access protected member
 bt_volver without a python subclass of
 abmlocalidades_aspx

  Error de código fuente: 

  Línea 7:          else: bt_volver.Visible = 0


This is known change - you should use reflection to access protected and private members.

something.GetType().GetField("bt_volver", BindingFlags.Instance | BindingFlags.NonPublic)

Or you can try ipy.exe -X:PrivateBinding switch.

0

精彩评论

暂无评论...
验证码 换一张
取 消