0
我的ascx想A.ascx在我写这样的如何调用ascx委托给其他ascx btn点击?
btnUpdate.Click += delegate
{
if (MaxLength.HasValue && txtText.Text.Length >= MaxLength.Value)
{
lblError.Text = string.Format(Resources.ErrorMessage_FieldLength, MaxLength);
return;
}
if (Update != null) Update(this, EventArgs.Empty);
};
现在我想打电话B.ascx此委托)上的OnInit委托(BTN点击
protected void btnHdnAnswer_Click(object sender, EventArgs e)
{
// How to call above delegate..
}
请帮助我在这
对不起,但你为什么要在mvc项目中使用web表单服务器端逻辑? –
这看起来不像MVC ... – Dismissile
是一个包含在B控件中的控件,还是它们只在同一页上? –