467,182 Members | 1,000 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,182 developers. It's quick & easy.

Web Control TextBox Selection during PreRender

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
  • viewed: 1692
Share:
2 Replies
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
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.

Similar topics

17 posts views Thread by gokul | last post: by
2 posts views Thread by John Lau | last post: by
2 posts views Thread by Marc Miles | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.