Set focus to a control inside a Updatepanel in Atlas

M

MSDN

After a postback, how do I set focus onto a control that is inside an
updatepanel?
 
S

Steven Cheng[MSFT]

Hello Ssflynn,

As for the ATLAS updatepanel setfocus function you mentioned, I've
performed some local tests, it seems the Page.SetFocus method or
Page.ClientScript.RegisterXXXX methods will work only if the
"scriptmanager" is configured as "enablepartialrendering=false". However,
in such mode, the whole page will be rerender when we perform postback.

<atlas:Scriptmanager id="ScriptManager" runat="server"
enablepartialrendering="true" />

Currently, I'm doing some further research to see whether we can find a way
to set control focus when use "partialrendering" mode for updatable. I'll
update you as soon as I've got any finding.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steven Cheng[MSFT]

Hello Ssflynn,

How are you doing on this issue? After further discussion with some
production engineer, so far there is no built-in API or interface that will
control focus in atlas udpatepanel. However, In Atlas 1.0 and future
versions we'll have built-in control focus support (e.g.
ScriptManager.SetFocus(Control), etc.).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
V

venkat

Is there any built-in API or interface that will
control focus in atlas udpatepanel?

Is there any Patch available for ScriptManager.SetFocus(control) , after the Partial Postback is completed?

Thanks in Advance
 
S

Steven Cheng[MSFT]

Hi Venkat,

Thanks for your input.

So far what I've got the from the product team is that the focus control
(ATLAS specific) will be provided in the 1.0 release only).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

MSDN

I still would like to be able to do this, I've given up on it so far.

Has the Atlas 1.0 been released yet?
 
S

Steven Cheng[MSFT]

Thanks for your followup Ssflynn,

So far the available ATLAS package is still the CTP version. We haven't got
the definite date of the relase of ATLAS 1.0. Anyway, you can keep
monitoring on the www.asp.net ATLAS home on any new update.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Joined
Oct 11, 2006
Messages
1
Reaction score
0
There is a solution to this problem.

You just need to register the clientscript at server side to set the focus on control.

Script is as follows:

string script = "document.getElementById('" + TextBox1.ClientID + "').focus();";

script = script + " WebForm_AutoFocus('" + TextBox1.ClientID + "');";

Page.ClientScript.RegisterStartupScript(this.GetType(), "script1", script, true);
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top