473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

LostFocus Firing on PageLoad

I have a form that has a cbo set to TabIndex 0 (it is the only item set to
tabindex 0). On page Load if I step through the code that cbo LostFocus
event fires after other initializations are completed and after the
LostFocus event completes, that cbo gets focus and the form opens? Why is
that LostFocus event firing? Any hints on how to debug this?

Wayne
Nov 21 '05 #1
4 1354
On Tue, 26 Oct 2004 17:09:24 -0600, "Wayne Wengert"
<wa***************@wengert.com> wrote:
I have a form that has a cbo set to TabIndex 0 (it is the only item set to
tabindex 0). On page Load if I step through the code that cbo LostFocus
event fires after other initializations are completed and after the
LostFocus event completes, that cbo gets focus and the form opens? Why is
that LostFocus event firing? Any hints on how to debug this?

Wayne


Did you say it was happening when you step through the code? If that's
the case, is the form not loosing focus when the VS IDE gets focus for
you to step through the code?

Hope this helps

Tom.
Nov 21 '05 #2
When I step through the code I see the following:

1. The PageLoad event fires and that code runs - initializes some cboBox
lists and such
2. When PageLoad exits the LostFocus event immediately fires for the cbo
with tabindex 0
3. The form opens with that cbo having focus (the GotFocus event never
fires?)

Wayne

"Tom John .decsixth.co.uk>" <tj@<removethis> wrote in message
news:79********************************@4ax.com...
On Tue, 26 Oct 2004 17:09:24 -0600, "Wayne Wengert"
<wa***************@wengert.com> wrote:
I have a form that has a cbo set to TabIndex 0 (it is the only item set totabindex 0). On page Load if I step through the code that cbo LostFocus
event fires after other initializations are completed and after the
LostFocus event completes, that cbo gets focus and the form opens? Why is
that LostFocus event firing? Any hints on how to debug this?

Wayne


Did you say it was happening when you step through the code? If that's
the case, is the form not loosing focus when the VS IDE gets focus for
you to step through the code?

Hope this helps

Tom.

Nov 21 '05 #3
On Wed, 27 Oct 2004 03:51:16 -0600, "Wayne Wengert"
<wa***************@wengert.com> wrote:
When I step through the code I see the following:

1. The PageLoad event fires and that code runs - initializes some cboBox
lists and such
2. When PageLoad exits the LostFocus event immediately fires for the cbo
with tabindex 0
3. The form opens with that cbo having focus (the GotFocus event never
fires?)


Can you post a code snippet that illustrates this please?

Thanks

Tom
Nov 21 '05 #4
Tom;

What code is needed? Basically, The Page Load Event Fires and then the Lost
Focus event for the cbo with tabindex = 0 fires. There is not really any
"code" involved. I tried it with minimal code in page load (initialize a
textbox) and lost focus (change background color).

Wayne

"Tom John .decsixth.co.uk>" <tj@<removethis> wrote in message
news:rp********************************@4ax.com...
On Wed, 27 Oct 2004 03:51:16 -0600, "Wayne Wengert"
<wa***************@wengert.com> wrote:
When I step through the code I see the following:

1. The PageLoad event fires and that code runs - initializes some cboBox
lists and such
2. When PageLoad exits the LostFocus event immediately fires for the cbo
with tabindex 0
3. The form opens with that cbo having focus (the GotFocus event never
fires?)


Can you post a code snippet that illustrates this please?

Thanks

Tom

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kory Pukash | last post by:
I have an asp.net(2003) form that uses web server controls event architecture. The form has edit, cancel, save, delete buttons on it. When the delete button is clicked the following events fire. ...
0
by: Bammer22 | last post by:
I have a from with a few webcontrols (all dropdownlists and one button) that is built dynamically during page load. The button is also built dynamically and its eventhandler is set during pageload...
3
by: JoakimR | last post by:
Hello, I have a problem with events not firing. I've created a web user control which renders a calendar using a table control. In two cells I'm adding LinkButtons for "prev/next month". However,...
0
by: Scott McChesney | last post by:
All - I am in the process of developing a custom control that mimics the Office 2003 "Inbox" as closely as possible. After a great deal of frustrating work trying to do a heavily custom-drawn...
2
by: Piotrekk | last post by:
Hi I need to use catch an event LostFocus, but its not visible in Evens list in Properties Window of Form1. Should i do it manually? How then? Tnanks PK
6
by: Kevin Attard | last post by:
I am using a GridView inside a UserControl which has a template column for deleting the rows. Before databinding the gridview i am attaching the RowCommand and RowDataBound event. I am using the...
2
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hello, I have a page that contains a user control that is nested within other user controls... the nesting is quite deep, not sure exactly how ddep but there is a control inside a control inside...
4
by: femina | last post by:
the ValueHiddenField_ValueChanged event is not firing please help me how to trigger my value changed event so that Message.Text that is "The value of the HiddenField control is " +...
2
by: tshad | last post by:
In VS 2008, I have 2 pages, one aspx page and one ascx page. The PreRender event is not firing on the Contol page. The aspx page starts out: <%@ Page Language="VB" AutoEventWireup="true"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.