CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 11/12/2004 11:51:59 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 24 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
widgetninja
Asp.Net User
Interesting Event/Delegate question for those in the know11/12/2004 11:51:59 PM

1/1

I have a control that I only want to emit postback submission if its events have handlers attached to them. For my example let's assume that the event is called ServerClick. Here's where it gets interesting.

In the control, upon the initial loading of the page, I can inspect the event via the hidden member ServerClickEvent ala either of the following:


CType(ServerClickEvent, System.MulticastDelegate).GetInvocationList()
or
Dim handler As EventHandler = CType(Events(ServerClickEvent), EventHandler)


Once I postback though and the OnServerClick event has been handled, ServerClickEvent is nothing. Why is this?

If I emit postback code regardless of attached handlers, the OnServerClick event is always handled correctly by the page (despite the above description), so I know there's something, somewhere that I can get the information I want... How can I tell 100% of the time whether any specified event has an invocation list with a length greater than 0?


Underpaid, painfully underutilized, and always looking for more work in Va.
llangleyben
Asp.Net User
Re: Interesting Event/Delegate question for those in the know11/13/2004 11:34:34 AM

0/0

Hi,
it can be problem of control lifecycle. May be event handler attached in hosting page after you perform check in control.

Leon Langleyben

MCSD, ASP.NET MVP

Blog
widgetninja
Asp.Net User
Re: Interesting Event/Delegate question for those in the know11/15/2004 4:44:33 PM

0/0

No, I'm actually checking in the rendering code for the control.

Anybody else out there know how to reliably query an event for handlers?
Underpaid, painfully underutilized, and always looking for more work in Va.
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Everything You Ever Needed to Know About Training: A One-stop Shop for Everyone Interested in Training, Learning and Development Authors: Kaye Thorne, David Mackey, Pages: 242, Published: 2007

Web:
Curiosity is bliss: C# events vs. delegates I don't know why events can only be fired by class that declare the event. .... is an interesting article on the differences between Events and Delegates. ...
CHOOSING DELEGATES.; Interesting Debate in the New-York Meeting ... A warm discussion ensued, upon the question whether this was to bind tho to cast .... as delegate in the presence and foil knowledge of those , was bound by ...
CodeProject: Events and Delegates simplified. Free source code and ... Now that you know how to use delegates, let's understand events. ..... Multcast delegates are those delegates which are subscribed ore registered by more ...
Brad Abrams : Events, Delegate and Multithreading Jan 14, 2005 ... So back to the main question. Why is the null test required? ... Interesting Note on Delegates, Events and Multithreading; # TrackBack said ...
.NET: Hacking events and manipulating delegates May 19, 2008 ... This final step sets the value of the field to the new delegate. It is interesting to note that if the list of event handlers had been ...
My Decision - 2008: Interesting events over night - Obama gains ... Interesting events over night - Obama gains delegates, Hillary Claims lead ... If she wants to claim the lead and include those two states, then it should ...
Simple C# Question? How to pass an event delegate as a parameter? Simple C# Question? How to pass an event delegate as a parameter? .... AddThis Social Bookmark Button. Post Other interesting topics ...
That Pesky Pledged Delegate Question | The Trail | washingtonpost.com Mar 26, 2008 ... Be the first to know when there's a new installment of The Trail. ... If she wants those pledged delegates to come her way too..then let me ...
Creating Custom Delegates and Events in C# When an event is raised, all the delegates in the invocation list are executed in the order they were added. The sender of the event does not know which ...
Safely invoking event delegates Aug 11, 2008 ... Yesterday, my friend and I had an interesting conversation. ... And 2) Check the delegate for null. Now I know calling Event. ...

Videos:
WCN # 192 - World Chess News - ( Mitt i Schack ) This episode contains of: * Ladies Open in Sweden * American Chess Federation * Påskturneringen (“The Easter Tournament”) * Amber Blindfold and Rap...
7 Levels of Internet Marketers If you want to jump-start your life and your business, you have to know what type of Internet Marketer you are. Watch this video now! Note: This vid...
Core Patterns for Web Permissions Google TechTalks July 19, 2006 Tyler Close Visiting Scientist Hewlett-Packard Laboratories Mr. Close is a researcher and developer, working in the...
White Jumping High Flyer Ya I try. Just don't hate, I know im not the best. Screened in order; Wall Street Journal, Network, iLife, Better, Restarting, Viruses, Work, Touch...
White House Press Briefing by Tony Snow (01-17-2007) http://www.whitehouse.gov/news/releases/2007/01/20070117-5.html
Charlie Rose - M.K. Narayanan / Journalist Panel / Gucharan Das Segment 1: M.K. Narayanan, National Security Adviser Of India Segment 2: A Discussion with prominent journalists based in India: Shekhar Gupta, Edit...
WCN # 210 - World Chess News - ( Mitt i Schack ) This episode contains of: * The 41st Biel International Chess Festival * The Swedish Championship in Växjö * The Swedish Chess Federation congress *...
Charlie Rose - Kofi Annan An hour with Kofi Annan, Secretary-General of the United Nations. He looks back at his tenure at the UN and the future of the organization. He also d...
Understanding the Roman Catholic Church After centuries of mistrust, indifference and even hostility, attitudes between Roman Catholics and other Christians are changing. Dialogue, cooperat...
Manifest Destiny: Still Alive and Kicking American nationalism, what Americans call “patriotism,” is grounded in this belief that Liberty and Empire are uniquely reconciled in the history of ...




Search This Site:










how can i call a user control many times?

datagridcolumncollection in aspx source

how a icon can represent my custom control ?

listbox listitem custom attributes (style), viewstate problem

when oncomponentchanged event get fired in a custom designer

w2k3 + iis standalone web server

forms onsubmit() method not called when submit() invoked

custom controls and postback

regularexpression in c# custom control, help!

anyone use wh4l for their web site?

creating a control at runtime....

dynamic user controls as objects

custom and standard controls interaction

web server control problem

custom control caching...

checkboxs dinamics...

how can know class of a webcontrol

problem of layering user control over server control

user control

error trying to pxe boot.

how to call imagebutton event from user control?

web-based client ftp

property won't persist between postbacks

viewstate expert needed

dropdownlist requery

newbie question: passing page variables to server control

two controls with same name but different namespace

transferring domains

fraa asp.net, .net 2.0, sql 2005 ?

sharepoint and web parts help articles

  Privacy | Contact Us
All Times Are GMT