473,671 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event Not Firing

Hello,

I've got an issue with a dynamically assigned event not actually being
assigned correctly to a linkbutton- or at least that appears to be the
issue.

The linkbutton doesn't work on 1st click, but does on 2nd click.

I've tried assigning the event as early in the page cycle as possible
(in OnInit() for example), calling the event-assigning function more
than once- all to no avail.

I've also stepped through the event-assigning function and it does
appear to be executing the event assignment for the linkbutton-
however, the first click on the lb does not do anything.

However, the event *does* fire on the 2nd click (after doing a
post-back).

Any ideas or suggestions are much appreciated.

TIA!

Jeff

Nov 19 '05 #1
2 1142
Try throwing the event into the page_load (making sure NOT to put it into an
IsPostBack() check... see if that makes any difference.
Otherwise, you will probably have to show the pertinate code.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"je**********@h otmail.com" wrote:
Hello,

I've got an issue with a dynamically assigned event not actually being
assigned correctly to a linkbutton- or at least that appears to be the
issue.

The linkbutton doesn't work on 1st click, but does on 2nd click.

I've tried assigning the event as early in the page cycle as possible
(in OnInit() for example), calling the event-assigning function more
than once- all to no avail.

I've also stepped through the event-assigning function and it does
appear to be executing the event assignment for the linkbutton-
however, the first click on the lb does not do anything.

However, the event *does* fire on the 2nd click (after doing a
post-back).

Any ideas or suggestions are much appreciated.

TIA!

Jeff

Nov 19 '05 #2
The easiest way to debug this would be to disable Smartnavigation (if you
have it enabled) and then browse to the page and do a ViewSource. The
Linkbutton should have the proper JavaScript code to raise the Event during
Postback. You can check the code the first time (you had mentioned that it
did not work) and then the code the second time (just before it actually
worked). The difference in this code will shed some light as to how ASP.NET
is working behind the scene and if you could post that then someone could
take it from there.

HTH

Regards,

Trevor Benedict R
MCSD

<je**********@h otmail.com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Hello,

I've got an issue with a dynamically assigned event not actually being
assigned correctly to a linkbutton- or at least that appears to be the
issue.

The linkbutton doesn't work on 1st click, but does on 2nd click.

I've tried assigning the event as early in the page cycle as possible
(in OnInit() for example), calling the event-assigning function more
than once- all to no avail.

I've also stepped through the event-assigning function and it does
appear to be executing the event assignment for the linkbutton-
however, the first click on the lb does not do anything.

However, the event *does* fire on the 2nd click (after doing a
post-back).

Any ideas or suggestions are much appreciated.

TIA!

Jeff

Nov 19 '05 #3

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

Similar topics

13
7478
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on it, a frontend and a backend. Case 1: If vba code on the frontend updates many rows (360,000) on the backend, a form's timer event (from the frontend) will stop firing until the user gives the form focus. (Note that the update itself always...
0
1685
by: Ram | last post by:
I have a start page for my application default.htm which contains four frames. header.htm login.aspx rightside.htm footer.htm login.aspx conatins username, password fields and login button. When the login is successful login page writes back javascript
4
4190
by: TS | last post by:
I am creating a User control and i create some dynamic controls in the init handler. one of the controls is a custom validator which i assign a serverValidate event handler. I usally always do my controls as custom server controls and don't understand why this event won't fire. I figured if the creation of the control was in the init, it would be initialized and have its event handlers set up, then after Load, the control would call its...
5
4530
by: jaysonnward | last post by:
Hello All: I've recently been recreating some 'dropdown menus' for a website I manage. I'm writing all my event handlers into my .js file. I've got the coding to work in Firefox, but the onmouseleave / onmouseout event I've attached to my hidden drop down (in this case an <ul>), is not firing correctly. It seems that when the mouse enters the ul it fires the mouseleave event. The problem is in the hideMenu2(e) function. I'm copying...
2
3910
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite well, so at times it is tempting just to port parts of it over mostly as-is. In fact, one MSDN article I read suggested using straight HTML wherever possible to make the app more efficient and less resource demanding. On one page there are 2...
0
8473
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
8390
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,...
0
8911
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7428
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...
0
5692
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
4222
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...
1
2808
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.