I have a GridView with an associated DataKey, which is the item ID.
How do I retrieve that value inside the RowCommand event?
This seems to work, but I don't like the cast to LinkButton (what if some other command is firing the event?), and I'm not too confident about the NamingContainer bit.
LinkButton lb = (LinkButton)e.CommandSource...
I need to have an onclick/hover event on an input tag which is disabled.
Is there another way but to wrap it in another tag and give that tag the events?
<input type="checkbox" onclick="cant_choose('event')" disabled="disabled" value="2" name="enroll_to[event][]">
...
Doing some development in Flash Builder 4 using Action Script 3.0. I'm trying to have some code run each time the form is displayed. The form is not always recreated, but sometimes hidden and reused. Visual Basic used to have an Activate event that does similar to what I want.
I tried Render, but that fires every time the form change...
In the following console application example, the event is defined like this:
public delegate void PurchaseHandler(object obj, PurchaseArgs args);
public event PurchaseHandler OnPurchaseMade;
It seems to me after reading around that this might be a bit "C#2".
Is there a more abbreviated way to express this with C#3 and C#4?
using S...
I have a Sender class that sends a Message on a IChannel:
public class MessageEventArgs : EventArgs {
public Message Message { get; private set; }
public MessageEventArgs(Message m) { Message = m; }
}
public interface IChannel {
public event EventHandler<MessageEventArgs> MessageReceived;
void Send(Message m);
}
public class S...
Not really hard core programming, but it's been bugging me. I need to do a simple mail merge and in the merge I need to personalize the url.
It seems like the only option is to use a macro (alt-f9 field editing doesn't work as expected), but I just cant get it running.
I've created an EventClassModule as described here: http://msdn.mic...
I have a form that is showing a MessageBox using MessageBox.Show, and trying to receive events from the Help button on the MessageBox so I can execute my own code. The Microsoft documentation shows how to do this; however, using what is suggested does not work. Here's a shortened version of my code:
Private Function MethodName() A...
I'm using a framework called Processing which is basically a Java applet. It has the ability to do key events because Applet can. You can also roll your own callbacks of sorts into the parent. I'm not doing that right now and maybe that's the solution. For now, I'm looking for a more POJO solution. So I wrote some examples to illust...
I am able to render a google map on a flex canvas. I create the map using the code below and then place markers on it in the onMapReady method (not shown)
var map:com.google.maps.Map=new com.google.maps.Map();
map.id="map";
map.key="bla bla";
_mapCanvas.addChild(map);
map.addEventListener(MapEvent.MAP_READY,onMapReady);
It all works ...
Say when the page loads, this code runs:
jQuery(document).ready(function($){
$('#overlay').overlay( api: true );
});
How would I bind an event to it? I've tried:
$('#overlay').onBeforeLoad( function(){ alert('Hi'); });
$('#overlay').bind( 'onBeforeLoad', function(){ alert('Hi'); });
var api = $('#overlay').data('overlay');
api.o...
Hello, I am an uber n00b to flash AS3. And it is not my intention to sound like a complete moron, but honestly, I have had a hard enough time figuring out just how to load an external .swf into my main file! And now my friend is asking me if I could please add a button within the external .swf which will unload itself and load a new on ...
base.event += this.EventHandler()
is this code safe ?
will it cause a leak ?
...
I want to be notified when a build has been completed\failed in visual studio and I DO NOT want to use pre\post build steps, I want an external process or VS plugin that will count the number of builds.
So is there anyway to achieve this using something like WMI or other such technology?
I'm not interested in third party libaries, I wa...
I have a problem on calling my private method on MouseWheel event. In fact my mouse wheel event gets fired properly when i only increment a variable or display something in Title bar etc. But when i want to call a private method, that method gets called only one time which is not the requirement i want to call that method depending on th...
EDIT - not getting much input on this so here's the skinny. I'm posting keyboard events to a PSN. I then switch to another window, post some more events (this time tat session level) and switch back to the first window. When I start posting to the PSN again, nothing happens. Until I move the mouse or scroll wheel. Why would this be ...
Hello,
I have an input tag. This tag does not have the autocomplete feature turned off, thus, one does not necessarily need to release a key to change the value of this field and focus anotehr one. My question is: how can I detect ANY value changes of this particular field, like e. g.
<input onvaluechange="//do following..." />
The ...
Hi
I have a video playing on my page. I want to show and hide some div's when the video reaches a certain point. Lets say hide something on 10th second and show it again on 20th second.
I can easily do it in HTML5 with video tag and currentTime attribute but for IE I have to create the same functionality and I think with flash based v...
I have a WPF based ActiveX control (COM interop). I am able to use it correctly by registering the control. When I tried to Reg-Free-COM (using manifest files) the control seems to be activated, but the events (such as mouse click, RequestBringIntoView etc) dont respond. Interestingly, Double click and tab key works.
I read in the this ...
i have a menu item, and i'm trying to assign its OnClick event handler:
miFrobGizmo.OnClick := {something};
The OnClick event handler property, like almost every other event handler, is defined as a TNotifyEvent method type:
property OnClick: TNotifyEvent
where TNotifyEvent is:
TNotifyEvent = procedure(Sender: TObject) of object;...
I have a static generic class that helps me move events around with very little overhead:
public static class MessageBus<T> where T : EventArgs
{
public static event EventHandler<T> MessageReceived;
public static void SendMessage(object sender, T message)
{
if (MessageReceived != null)
MessageReceived(sen...