473,670 Members | 2,574 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AutoEventWireup problem

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 the first line in the method
"Page_load" : Response.write( "hello"); . But nothing showed up when
running the page.

But when I changed the AutoEventWireup to be "true" from "false", they work
well again.

Two things that I cannot understand:

1. I didnot do nothing on system setting, but why they worked well before
this morning, but they didnot work after this morning.

2.why some user controls and pages still work well even I did not change
their AutoEventWireup value from "false" to "true".

Does anybody know what happened?

Thanks

Qing

Nov 18 '05 #1
1 2456
Quentin Huo wrote:
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 the first line in the method
"Page_load" : Response.write( "hello"); . But nothing showed up when
running the page.

But when I changed the AutoEventWireup to be "true" from "false", they work
well again.

Two things that I cannot understand:

1. I didnot do nothing on system setting, but why they worked well before
this morning, but they didnot work after this morning.

2.why some user controls and pages still work well even I did not change
their AutoEventWireup value from "false" to "true".

Does anybody know what happened?

Thanks

Qing


Have you built the website with Visual Studio.NET? Sometimes VS removes
the/some eventhandlers. Don't know why but it's a behavior I've noticed
some times. You can't see it in the output window of VS, evereything
compiles fine and looks like it works fine.

The behavior of AutoEventWireUp in combination with methods like
Page_Load as you described are by design, no need for a explicit
eventhandler in that case.

//Rutger
Nov 18 '05 #2

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

Similar topics

2
406
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 'run' the application, I get two treeviews instead of one. I'm thinking this is because of the AutoEventWireup property being set to true. 1. Am I correct? If so, if the AutoEventWireup property is true, why does it create two treeview in my user...
1
1897
by: prem | last post by:
Hi , Any one please give me the Usage with example for AutoEventWireUp PageDirective. Regards, Prem.
0
925
by: -Karl | last post by:
Ok.. I am totally stumped on this one. My site was workign great for awhile until I needed to have a Page_load event added to it. I added it and saw that it wasn't working. After ripping apart my code, I found out my problem was the autoeventwireup="false" was causing my problem. So I then changed it to true and was happy to see my page_load was working. Further testing of my site lead me to my next and current issue. I have a...
1
1996
by: Nitin | last post by:
I'm using the following code to verify weather the checkbox in the template column of the datalist1 is checked ' Sub Button1_Click(sender As Object, e As EventArgs) cart.text="" Dim i As Integer For i = 0 To productlist.Controls.Count - 1 Dim item As DataListItem = productlist.Controls(i) If item.ItemType = ListItemType.Item Or item.ItemType = ListItemType.AlternatingItem Then Dim cb As System.Web.UI.WebControls.CheckBox =...
7
1557
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! Anyway, anyone know where to change this setting? I've set the "default" in web.config to false, but new pages still have it coded into the page directive as true, which overrides. I don't want to have to do a search/replace before I publish the...
5
3564
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 create a new VB website using code-behind, the following Page directive is inserted : <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
28
10258
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 appropriate based on your method names . the GridView has OnRowCommand="GridView1_RowCommand" in the aspx. my problem is that the RowCommand event is firing twice (95% of the time) on the page. the other 5% it only fires once. there's no
5
1513
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 autoeventwireup="false" (that has a masterpage with autoeventwireup="false" as well) and Page_Load DOES fire in the page. How can this be ? Other pages using the same Master page does NOT fire Page_Load, unless I wire up the event manually. I'm totally confused....
0
1160
by: ABCL | last post by:
Hi All I have UserControl with "AutoEventWireUp="true" Property, and I have drop this User Control on the Master Page MasterPage has: <%@ Master Language="C#" AutoEventWireup="true" ...../> I have content page using this Master page If I use "AutoEventWireup="true" on the Content Page's Page
0
8384
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8813
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8591
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8659
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6212
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4388
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2799
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1791
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.