Focus in Web Control?

D

Dexter

Hello All,
I have a web control that when receive the focus, a postback is called,
using getPostBackEventReference. But, when the PostBack is called, i want
that the focus goes to the web control.

Somebody know how to make this?


Dexter
 
G

Guest

Hi,
You can retain focus during postbacks by setting SmartNavigation = True for
that page but SmartNavigation has some disadvantages.

"But if i understand you correctly you are trying to cause postback on focus
of a control and if you set focus to the same control will it not cause the
page to postback again" -- forgive me if i got you wrong :)

HTH
srini
 
C

Cirrosi

I tink you need use a javascript on bottom of html.
Try this:
RegisterStartupScript("whatyouwantstring","<SCRIPT
language=javascript>document.getElementById('controlname').focus;</SCRIPT>");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top