UserControl Page_InitComplete

G

gerry

based on MSPress's ASP.NET 2.0 Applications Advaced Topics ( Table 12-3
p.472 ), and
most events should be automatically wired up when @Control
AutoEventWireup="true".
ie. Page_InitComplete() {} should be invoked automatically without having to
wire up the event as : Page.InitComplete+=new
EventHandler(Page_InitComplete);
It seems that this is only true for a fairly restricted set of events which
does not include Page_InitComplete.
I thought that maybe a call to UserControl.InitializeAsUserControl() ( ibid
Table12-2 ) might be necessary but this method seems to be non-existant.
Is the documentation wrong or have I missed a setting somewhere ?


Also, when working with WebForms,UserControls etc in VS2005, thecontrol/page
itself is no longer listed on the control list at the top of properties
window as it was in vs2003 which means that all properties & events must be
set/added/wired up manually unlike other controls. Is there a new way to
access properties and events for WebForms & UserControls or is there a
setting i've missed to add these back to the property editor or did MS
remove this capability for some reason ?

Gerry
 
G

gerry

Thanks Steven,

I will see where I can submit an errata report to mspress regarding the
autoevent wireup for user controls in the book mentioned - i did look for
this initially but found none. As the book specifically states that the
autoamatic event hookup for usercontrols includes a list of 16 events and
not just the 9 you have listed.

My work around for form/control events was to enter override[space] in the
code view which causes intellisense to list all overridables for the current
class' base classes. But for a supposed RAD ide this to me is a big step
backwards. I will submit some feedback on this point as suggested.

Gerry
 
S

Steven Cheng[MSFT]

Thanks for your followup Gerry,

Yes, the book's statement seems a bit incorrect according to Usercontrol's
supported model. Sure, you can also submit the request of the errata.

If there is anything else we can help or any other information you wonder,
please feel free to let me know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top