相关问题: 在习俗文本Box上添加习俗
In the related question I asked how I could expose OnTextChange in my custom textbox control and we resolved it by:
public event EventHandler TextChanged
{
add { customTextBox.TextChanged += value; }
remove { customTextBox.TextChanged -= value; }
}
在实行控制时,我正在尝试使用像现在这样变形的活动:
<uc:CustomTextBox ID="customTextBox"
runat="server"
OnTextChanged="CustomTextBox_OnTextChanged">
</uc:CustomTextBox>
这似乎从来不是为了:
protected void CustomTextBox_OnTextChanged(System.EventArgs e)
{
// Do something here
}
或击中:
protected void CustomTextBox_OnTextChanged(object sender, EventArgs e)
{
// Do something here
}
我做了什么错误,我失踪了什么,这是我试图在这里做一切的最佳方式或共同做法?