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

Unable to change set with AJAX calendar extender/selectedvalue property

P: 3

I have a text box on an .aspx page that an AJAX calendar extender is tied to. When this page is loaded the text box in question is populated with a date from a selected record. I've tried using the "SelectedValue" property of the calendar extender to populate this text box, but what happens is this text box retains the focus after the page is loaded, which causes the calendar from the calendar extender to appear. I do not want this text box to have the focus on page load. I've tried using javascript and code in my code-behind fine to set the focus to another control but neither of these methods work. Does anyone have a solution to this?

Thanks in advance.

PS I'm using the following:
Visual Studio 2005/C#
AJAX Control Toolkit 1.0.20229.0
System.Web.Extensions 1.0.61231.0
Jul 3 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
Find the code which sets the focus to the text box. It'll be set using the focus() method. Can you show the code that you've tried, or some relevant code, e.g. the control that you're trying to set the focus to (please post the client-side code [view source in the browser], not .NET code).

One question I'd like to ask though: why does setting the focus on the text box cause the calendar to appear?
Jul 3 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.