111,126
社区成员
发帖
与我相关
我的任务
分享
private void butdelete_OnClick(object sender,Events e)
{
string str=this.txbstr.Text.Trim();
str=str.SubString(0,str.Length-2);
this.txbstr.Text=str;
}
private string DeleStr(string str)
{
if (str.Length > 0)
return str.Remove(str.Length - 1);
else
return str;
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = DeleStr(TextBox1.Text);
}
//按钮事件
private void button2_Click(object sender, EventArgs e)
{
//让文本框获取焦点
this.textBox1.Focus();
//模拟退格键
SendKeys.Send("{BackSpace}");
}