473,705 Members | 7,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1382
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.c om...
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.c om...
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
1678
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. PageLoad btnDelete_Click PageLoad btnDelete_Click
0
938
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 as well. My PageLoad does NOT user IsPostBack, for I want to re-create the controls on postback. Now, this app exists on a webfarm. The submit fires fine and works if the request & response stay on Server A. However if the form initially renders...
3
4321
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, the events from these are not fired. In the PageLoad event I check if it's a PostBack. If it isn't, I'm calling DisplayCalendar() to render the calendar. This part works and I get the output. If it *is* a postback (i.e. one of the linkbuttons...
0
1287
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 ListView (which is how I believe MS is doing it) and getting nowhere, I said "screw it" and built the thing from scratch. I have a UserControl with a few contained controls, a header control I'm drawing entirely by hand, and a Panel in which I'm...
2
1979
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
28160
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 RowDataBound event to set the commandargument of the delete button. The event is being fired and works fine. When I press the delete button, the RowCommand event is not firing! and neither is the RowDeleting (the button's commandName is...
2
1971
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 a ... etc. One of the user controls has a button click that tries to get a reference to the problematic user control nested inside of it but it throws an exception saying the user control does not exist, but this problem only happens on a...
4
4380
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 " + ValueHiddenField.Value is displayed in my web page <script runat="server"> void ValueHiddenField_ValueChanged (Object sender, EventArgs e) { // Display the value of the HiddenField control. Message.Text = "The value of the HiddenField control is...
2
6363
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" Trace="true" CodeFile="TakeSurveyTest.aspx.vb" Inherits="TakeSurveyTest" %> And the ascx page starts out:
0
8768
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8690
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9034
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7895
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6606
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5933
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4704
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.