.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links


Posted By:      Posted Date: August 31, 2010    Points: 0   Category :ASP.Net
hi i am using autoeventwireup="true" .i know this means it automatically combined page events of page life cycle.but when i set it to false form is running well and i dont need to write any code.so what is the diffrence what is set it true or false

View Complete Post

More Related Resource Links

Values in user control fields empty when AutoEventWireup=true ?

As a BizTalk developer I'm trying to build a ASP.NET website so some obvious things might be new to me (so please be gentle). I have a web form and I have a user control on it. This user control contains a panel with some user properties that are to be stored in a database. So far nothing fancy. The user control itself contains a panel and is working fine (all code to retrieve and store the values is working). I used the default settings of creating a user control and one of them was AutoEventWireup=true. This works fine because I also have some dropdown boxes (and other fields) that need to be filled with values from the database and that happens in the Page_load event. The panel specifies the 'DefaultButton' which calls a method when clicked to save the values after the user has changed them. On this click the code of the method is called, I confirmed that, but I found out that the values of my controls on the user control (for example the Textbox control) are empty. As a non-ASP.NET developer I couldn't figure out why. So I changed some settings like AutoEventWireup to false. Off course this resulted in my dropdown boxes no longer to be initially filled, but my surprise was big to find out my controls actually contained the values the user typed in. Logically I need both the values and th

The attribute 'autoeventwireup' is not allowed in this page

I have a solution that is a .net 3.5 aspx page. On my dev environment, everything works perfectly. When I change the master page, it changes along with it. I am using WSPBuilder to deploy on that environment.

When I take the solution to my UAT environment and it was a completely new install of SharePoint 2007, same thing. It worked really well. I deployed that by hand, however, using stsadm commands, but used the Project180.wsp that was made by WSPBuilder. It deployed as a feature. I enabled that feature and it is a beautiful thing.

Then I restored the content from my production environment. That is working well. Now my solution no longer works. Okay, I expected that. So I deploy again. Now I am getting the dreaded: An error occurred during the processing of . The attribute 'autoeventwireup' is not allowed in this page.

So I go back and make sure that it is completely removed as a feature and a solution. I even uninstalled the DLL's from the GAC and rebooted. I deployed again and I still get the same error. The dll's are in the GAC.

On my aspx page, here is my top line:
<%@ Page Language="C#" MasterPageFile="~masterurl/default.master" AutoEventWireup="true" Inherits="MFI.Project180.VideoPlayer.Project180Main, MFI.Project180.VideoPlayer, Version=, Culture=neutral, PublicKeyToken=

Getting error: The attribute 'autoeventwireup' is not allowed in this page again.


Parser Error


Description:  An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The attribute 'autoeventwireup' is not allowed in this page.

Source Error:

Line 1: <%@ Page Language="C#" MasterPageFile="~masterurl/default.master" AutoEventWireup="true" Inherits="VideoPlayer.Main, VideoPlayer, Version=, Culture=neutral, PublicKeyToken=994820a50e578b12" Codebehind="Main.aspx.cs" %>
Line 2: <%@ Register Assembly="VideoPlayer, Version=, Culture=neutral, PublicKeyToken=994820a50e578b12"
Line 3:  Namespace="VideoPlayer" TagPrefix="MP" %>


I have already done the following:

  1. Checked the GAC to see if the assembly was there. 
  2. Uninstalled and completely removed the solution.  Reboot the box and redeploy.
  3. Reghosted the page and the master
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend