By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,078 Members | 1,733 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,078 IT Pros & Developers. It's quick & easy.

Web Control TextBox Selection during PreRender

P: n/a
Hi folks. I have a WebControl TextBox which I would like to force to select
all it's text during PreRender. My problem is that I don't know how to do
this. I already have a reference to the control by using FindControl(), but
I don't see any method or property I can use to set the selection range. I
am looking for something like SelectionStart() and SelectionLength().

The WinForms TextBox has these methods, but the Web Forms does not. Any
ideas on how to do this?

--
Paul C
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Paul,

You can do it on client side. Handle body onload event and call select()
method for the <input type=text...> element representing the textbox.

Eliyahu

"Paul C." <ja**@jacostacos.com> wrote in message
news:G1******************@newssvr11.news.prodigy.c om...
Hi folks. I have a WebControl TextBox which I would like to force to select all it's text during PreRender. My problem is that I don't know how to do
this. I already have a reference to the control by using FindControl(), but I don't see any method or property I can use to set the selection range. I am looking for something like SelectionStart() and SelectionLength().

The WinForms TextBox has these methods, but the Web Forms does not. Any
ideas on how to do this?

--
Paul C

Nov 19 '05 #2

P: n/a
Eliyahu,

Thank you. I will try it this route.

Paul C.

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:eA**************@TK2MSFTNGP12.phx.gbl...
Paul,

You can do it on client side. Handle body onload event and call select()
method for the <input type=text...> element representing the textbox.

Eliyahu

"Paul C." <ja**@jacostacos.com> wrote in message
news:G1******************@newssvr11.news.prodigy.c om...
Hi folks. I have a WebControl TextBox which I would like to force to

select
all it's text during PreRender. My problem is that I don't know how to
do
this. I already have a reference to the control by using FindControl(),

but
I don't see any method or property I can use to set the selection range.

I
am looking for something like SelectionStart() and SelectionLength().

The WinForms TextBox has these methods, but the Web Forms does not. Any
ideas on how to do this?

--
Paul C


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.