如果我传递包含 a 的派生类testA
a ,其 url 以波浪号开头,它会正确解析它。但是,当我通过
(除了它继承自
)相同的它时,它会按字面意思呈现它(不转换/解析'〜')PlaceHolder
Hyperlink
testB
System.Web.UI.UserControl
PlaceHolder
有任何想法吗?
public class testA : System.Web.UI.Control
{
public System.Web.UI.WebControls.PlaceHolder plc { get; set; }
protected override void OnLoad(EventArgs e)
{
if (plc != null)
this.Controls.Add(plc);
base.OnLoad(e);
}
}
public class testB : System.Web.UI.UserControl
{
public System.Web.UI.WebControls.PlaceHolder plc { get; set; }
protected override void OnLoad(EventArgs e)
{
if (plc != null)
this.Controls.Add(plc);
base.OnLoad(e);
}
}
这是 ASP.NET