473,399 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

AutoEventWireUp Usage with Example

Hi ,
Any one please give me the Usage with example for
AutoEventWireUp PageDirective.

Regards,
Prem.
Nov 18 '05 #1
1 1882
The ASP.NET page framework supports an automatic way to associate page
events and methods. If the AutoEventWireup attribute of the Page directive
is set to true , the page framework calls page events automatically,
specifically the Page_Init and Page_Load methods. In that case, no explicit
Handles clause or delegate is needed.

The disadvantage of the AutoEventWireup attribute is that it requires that
the page event handlers have specific, predictable names. This limits your
flexibility in how you name your event handlers. Therefore, in Visual
Studio, the AutoEventWireup attribute is set to false by default and the
designer generates explicit code to bind page events to methods.

If you do set AutoEventWireup to true, Visual Studio will generate code to
bind the events and the page framework will automatically call events based
on their names. This can result in the same event code being called twice
when the page runs.
--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"prem" <pr**@net.pennywisesolutions.com> wrote in message
news:#i**************@TK2MSFTNGP09.phx.gbl...
Hi ,
Any one please give me the Usage with example for
AutoEventWireUp PageDirective.

Regards,
Prem.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: rbt | last post by:
Would a Python process consume more memory on a PC with lots of memory? For example, say I have the same Python script running on two WinXP computers that both have Python 2.4.0. One computer has...
2
by: Guy Lafleur | last post by:
I have a user control that builds a treeview dynamically in the Page_Load event. Also, I have the AutoEventWireup property set to true (i.e., <%@ Control AutoEventWireup="true" %>). Then, when I...
1
by: Quentin Huo | last post by:
Hi: This morning I found something wrong in my asp.net application: some pages and user controls didn't work well. it seems their Page_load method didnot work. For example if add a statement in...
7
by: Danny Tuppeny | last post by:
Hi all, Looks like autoEventWireup defaults to true in 2.0. Kinda silly if you ask me, since the MS site says there's a performance penalty, and I can't imagine it's something used very often! ...
5
by: Juan T. Llibre | last post by:
OK, guys, usually I answer questions instead of asking them, but this thing has me scratching my head. Why is the default for AutoEventWireup different for C# and VB.NET ? In VS 2005, if I...
28
by: Tim_Mac | last post by:
hi, i'm new to .net 2.0, and am just starting to get to grips with the gridview. my page has autoEventWireUp set to true, which i gather is supposed to figure out which handlers to invoke when...
7
by: Leonel Gayard | last post by:
Hi all, I had to write a small script, and I did it in python instead of shell-script. My script takes some arguments from the command line, like this. import sys args = sys.argv if args ==...
5
by: Carlo Marchesoni | last post by:
I read that autoeventwireup="false" doesn't cause Page_Load to fire automatically and trying it out with a simple page this can be confirmed easily. However, I have a page with...
10
by: rdemyan via AccessMonster.com | last post by:
My app contains utility meter usage. One of the things we have to deal with is when a usage is clearly incorrect. Perhaps someone wrote the meter reading down incorrectly or made a factor of 10...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.