第1个回答 2008-09-12
在 Click 事件里调用 SelectAll()
private void textBox1_Click( object sender, EventArgs e )
{
textBox1.SelectAll();
}本回答被提问者采纳
第2个回答 2014-01-21
在 Click 事件里:((TextBox) sender).SelectAll ();
第3个回答 2008-09-12
在textBox1.Enter事件中写入
textBox1.SelectAll()
private void textBox1_Enter(object sender, EventArgs e)
{
textBox1.SelectAll();
}
第4个回答 2008-09-11
这需要运用javascript来达到目的。
<asp:TextBox ID="TextBox1" runat="server" onclick="this.select()"></asp:TextBox>