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!



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 8/1/2004 8:31:37 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 174 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
WhatThe12
Asp.Net User
IPostBackEventHandler and IPostBackDataHandler8/1/2004 8:31:37 PM

0/0

Hi,

If a control implements both IPostBackEventHandler and IPostBackDataHandler, will it ever raise a postback event?

I ask this because looking at the framework code using Reflector, it seems that when loading postback data, the framework checks to see if a control implements IPostBackDataHandler and if it does, it doesn't even atempt to see if the control also implements IPostBackEventHandler.
Web dev - spending forever achieving nothing.
joteke
Asp.Net User
Re: IPostBackEventHandler and IPostBackDataHandler8/2/2004 1:05:00 PM

0/0

Hi,

If control implements both interfaces, IPostBackDataHandler goes over by default. If you still want to raise with IPostBackEventHandler, you'd call Page.RegisterRequiresRaiseEvent (in IPostBackDataHandler implementation) to get the other one called (raised).
Thanks,

Teemu Keiski
Finland, EU
WhatThe12
Asp.Net User
Re: IPostBackEventHandler and IPostBackDataHandler8/2/2004 6:27:26 PM

0/0

Ok thanks. Do you know of a reason why both don't get automatically called?
Web dev - spending forever achieving nothing.
joteke
Asp.Net User
Re: IPostBackEventHandler and IPostBackDataHandler8/2/2004 6:51:34 PM

0/0

Well, you had digged the implementation. :-)

But I'd think that because basically IPostBackDataHandler.LoadPostData would be called on every postback whereas IPostBackEventHandler.RaisePostBackEvent would be called usually only when your control has itself caused the postback (is the one that actually should raise a postback event), so I guess there is no room for assumptions in the Framework but in this particular scenario it has been left up to the user to explicitly decide what to do.

I suppose they have wanted to keep it as general as possible and keep both interfaces separate because their usage is usually in different scenarios. You can raise events via IPostBackDataHandler too, I mean that it is technically just as possible (TextBox does it, like you know).

Thanks,

Teemu Keiski
Finland, EU
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Developing Microsoft ASP.NET Server Controls and Components Authors: Nikhil Kothari, Vandana Datye, Pages: 689, Published: 2002
ASP.NET in a Nutshell: A Desktop Quick Reference Authors: G. Andrew Duthie, Matthew MacDonald, Pages: 979, Published: 2003
Professional ASP.NET 2.0 Server Control and Component Development Authors: Shahram Khosravi, Pages: 1186, Published: 2006
Developing .NET Custom Controls and Designers Using Visual Basic .NET Authors: James Henry, Pages: 600, Published: 2005
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005
ASP.NET AJAX Programmer's Reference: With ASP.NET 2.0 Or ASP.NET 3.5 Authors: Shahram Khosravi, Pages: 1522, Published: 2007
ASP.NET by Example Authors: Steven A. Smith, Pages: 527, Published: 2002
Professional ASP.NET 1.0: Updated and Tested for Final Release of ASP.NET V.1.0 Authors: Richard Anderson, Alex Homer, Dave Sussman, Karli Watson, Pages: 1354, Published: 2002
Designing Microsoft ASP.NET Applications Authors: Douglas J. Reilly, Pages: 402, Published: 2001
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008

Web:
Software/Technology Discussion : IPostBackDataHandler and ... IPostBackDataHandler and IPostBackEventHandler. I've been messing around with post back handler in ASP.NET today, and I found out a few points of interest. ...
Joteke's Blog : IPostBackDataHandler and IPostBackEventHandler in ... Sep 26, 2005 ... In ASP.NET 1.1 if your custom control implemented both IPostBackDataHandler and IPostBackEventHandler interfaces, it had to manually call ...
IPostBackEventHandler - microsoft.public.dotnet.framework.aspnet ... public class MyCustomControl : WebControl, IPostBackEventHandler, IPostBackDataHandler { ....... void IPostBackEventHandler. ...
CodeProject: Myth Regarding ViewState in ASP.NET. Free source code ... Sep 6, 2006 ... Re: Controls which are not inherited IPostBackDataHandler/ IPostBackEventHandler , member, GuenaVan, 1:22 16 Aug '05 ...
Safari Books Online - 0735615829 - Developing Microsoft ASP.NET ... You have to implement IPostBackEventHandler and/or IPostBackDataHandler only when your control needs to participate in the appropriate processing phase. ...
Anatomy of a Server Control (Part 3) On the server side, any controls that implement either the IPostBackDataHandler or IPostBackEventHandler interface (meaning that they process or handle ...
PostBackControl Class Implements the IPostBackEventHandler and IPostBackDataHandler interfaces. ... Implements IPostBackEventHandler, IPostBackDataHandler ...
ASP.NET ViewState and IpostBackEventHandler Interface Nov 13, 2005 ... The IPostBackEventHandler interface is for controls that raise events such ... IpostBackDataHandler. Anshu Bhatia replied at 14-Nov-05 09:59 ...
TreeView Class (System.Web.UI.WebControls) [ControlValuePropertyAttribute("SelectedValue")] public class TreeView : HierarchicalDataBoundControl, IPostBackEventHandler, IPostBackDataHandler, ...
LoadPostData and Page.RegisterRequiresPostBack(this) question ... or change IPostBackEventHandler to IPostBackDataHandler. Lostinet (Li Jian Dai) .NET MVP http://www.lostinet.com/ for LWTree/DatePicker ...




Search This Site:










problem with panels inside usercontrols

page template and pop up calendar control problem

how to detect causesvalidation on postback

usercontrol problem

free web hosting for asp .net 1.1

ultima hosts problems

custom gridview

server visible controls inside a template container??

syntax for registering non-namespaced custom server control in beta 1

major ie complaint (re:htc's) for ms ears

top-notch hosting?

solution : webcontrol & collections & imageurleditor & design time

stuck without multiple inheritance

multiple websites?

controls handling events of parent page

hosting asp.net web application with odbc connections

custom control

process or progress bar

properties issue within composite control

thread on ads problems

asp.net 2.0 and tele2 web-server

timer control?

calendar control

drop down control that allows editing

accessing control properties from another form

who is right.=?

msdn chat - windows 2003 hosting - october 19

need a new webhost ...i think

control ids in control tree

how can i create webcontrol property of type class?

  Privacy | Contact Us
All Times Are GMT