events

How to call the event of usercontrol in page of aspx.

I have created the usercontrol. There is event : public event System.EventHandler MemberSelectionChanged; I have called this event in aspx page like this(given below). It working fine. Is there any other way to call the user control event in aspx page. this.ucMemberList.MemberSelectionChanged += new EventHandler(MemberList_MemberSe...

Content Page and Master Page events

Hi guys, I have had this problem for a while now and no matter what i cannot seem to resolve it. I have a master page and a content page. The content page simply contains a button <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <asp:Conten...

Setting LinkButton's OnClick event to method in codebehind

I'm constructing a LinkButton from my codebehind, and I need to assign the onclick to a method, and pass a parameter with it too. I have this so far: LinkButton lnkdel = new LinkButton(); lnkdel.Text = "Delete"; The method I want to pass it to looks like this: protected void delline(string id) { } ...

In a WPF custom control, is it possible for a child element to Template bind to the event of the control?

I have a custom control that contains two elements that can be clicked (a button and a check box). I'd like to be able to put events in the XAML for each of these events. i.e. <Control OnButtonClick="SomeEvent" OnCheckBoxClick="SomeOtherEvent" /> I have no idea how to bind events like that. Any pointers? The following is the ...

Android Browser orientationchange event keeps firing

Following is simple html, when viewed on android browser(nexus one) results into continuos orientationchange event chain when you change phone's orientation just once.<html><body> <script type="text/javascript"> window.addEventListener("orientationchange",function(){alert("test");},false); </script> </body></html>Can somebody please expl...

Events not getting rendered with JSON feed.

I am trying to use a JSON feed to render events in fullCalendar. Here is the code. $('#calendar').fullCalendar({ editable : true, selectable : true, select : selectionMade, eventResize : eventsChanged, eventDrop : eventsChanged, selectable : tru...

How to I respond to a user pressing a UISegment?

How to I respond to a user pressing a UISegment? Is there a delegate, or must I programmatically (or Interface Builder), attach the selectors? ...

event when closing a Window, but without closing it

Hello, I want to show a "Confirm Close" window when closing the main app window, but without making it disappear. Right now I am using a windowsListener, and more specifially the windowsClosing event. But, this when using this event, the main window is closed and I want to keep it opened. He you have a chunk of the code I am using: To...

C# Create a Delegate that fires an event?

Is it possible to use Reflection is C# to fire an event? Say I have a situation like this: public delegate void SomeEventHandler(object sender, BenArgs e); class EventHub { public event SomeEventHandler SOME_EVENT; public void fireEvent(String eventName) { SomeEventHandler evt = (SomeEventHandler) Delegate.CreateDe...

Key event handlers don't fire at the form level

{Form constructor} this->KeyDown += gcnew KeyEventHandler(this, &Form::Form_KeyDown); ... void Form1::Form_KeyDown(Object^ Sender, KeyEventArgs^ E) { MessageBox::Show("Key = " + E->KeyCode.ToString(), "Test"); } The above event handler never fires. But the form's child controls' handler does. What would be the problem ? ...

If I have a button click event and an ObjectDataSource selecting event, which fires first and why?

Title explains it all really, which event fires first in the page life cycle and why? ...

Apple Events to Control Mouse Remotely

Hey, I'm not even sure where to begin with this question... I want to be able to send mouse-click events to another machine, as if the user had clicked on that machine. I can do it on the same machine via: CGEventSourceRef source = CGEventSourceCreate(NULL); CGEventType eventType = kCGEventLeftMouseDragged; CGPoint mouseCursorPosi...

How to find the key code for a specific key

What's the easiest way to find the keycode for a specific key press? Are there any good online tools that just capture any key event and show the code? I want to try and find the key codes for special keys on a mobile device with a web browser, so an online tool would be great. ...

weird jQuery dataTables rendering issue

Hi all, I'm working on a web app that uses menus (fg.menu) and jQuery UI tabs. These work great. I'm now trying to apply the dataTables plugin to the tables that I'm loading (via Ajax) in my tabs. The tables are generated on the server side (JSON is not an option right now) and sit in static files that I load into the tabs. The tables h...

WCF Event Hooks? Multithreading Trouble?

I am trying to come up with some tactics for hooking the connection event whenever an instance is created in my WCF server. I decorated my class like this: [ServiceBehavior( InstanceContextMode = InstanceContextMode.PerCall , ConcurrencyMode = ConcurrencyMode.Multiple , Namespace="http://mystuff/test" )] So I was wondering if there was...

How to make a character following your finger in Cocoa?

It was kind simple in other OS. I just got mouse movement x and y and redraw my character, however I do not see mouse event in Cocoa. COuld somebody point on a code samples? ...

.NET events, threads, and messages

I understand that an event handler executes on whatever thread that invoked the event. I further understand the need to update form controls only from the thread that created the controls. I am assuming that the UI thread is the one that created the form for the purpose of this question. If the event is the result of a posted message,...

How to count how many listeners are hooked to an event?

Assuming I have declared public event EventArgs<SyslogMessageEventArgs> MessageReceived; public int SubscribedClients { get [...] } I would like to count how many "subscribed clients" my class has. I need to sum those that subscribed over network though my APIs (not shown in the fragment) plus those that did channel.MessageReceiv...

Find + replace content of an element without loosing events.

Hi, I have a function that reads the content of an element, replaces a word with a link and then rewrites the content back into the element, obviously this means that all events that where previously set are lost. Does anyone know of a function/method that could find and replace content of an element without loosing the events? Thanks. ...

What events are invoked once the controls Loaded events already fired?

My windows has many ListBoxes that load their items in the Loaded event. After they are all loaded I have to run a method. I found out that the Grid Loaded event happens before its controls Loaded. What method will fire once after that? ...