【问题标题】:programatically access a specified (customised) property of an episerver control以编程方式访问 Episerver 控件的特定(自定义)属性
【发布时间】:2016-04-20 23:24:03
【问题描述】:

以编程方式访问episerver控件的指定(自定义)属性的好方法是什么(假设我有我需要在名为control的变量中指定的控件) 例如我正在尝试类似 control.GetProperty("CustomProperty1") 但它不起作用。

【问题讨论】:

  • 这是哪个 Episerver 版本?
  • Episerver 6 R2,很抱歉错过了这个

标签: c# properties controls episerver


【解决方案1】:

您是否正在尝试实现这样的目标?

var typedControl = control as YourControlType;
if (typedControl != null)
{
   var theProperty = typedControl.CustomProperty1;
}

【讨论】:

    猜你喜欢
    • 2010-11-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-22
    • 1970-01-01
    • 2023-04-01
    • 1970-01-01
    相关资源
    最近更新 更多