(Scott?) Migrated Vs2003 to web app vs2005 Page_load fires twice...

Hi there,

I have migrated a web project from vs 2003 to vs 2005 using web application projects... It works but page_load always fires twice. I know why this is ... because AutoEventWireUp is set to true BUT if i create a new page then AutoEventWireUp is also set to true and these don't fire twice..

I was looking for some hookup source code but it doesn't exist.... I swear i looked high and low... it isn't there.... i was looking for something like this

 this.Load+=new EventHandler(thi.Page_Load);

This means that the autoeventwireup would launch page_load and also above would... hence twice...

Has anybody got this problem also??

I could of course just set autoeventfireup to false on all OLD pages that were imported and then just use true on the new pages... but its a bit messy....

I would like to know where these are being hooked up.... because i don't find any Eventhandler code..

Thanks

Ian
0
ianspain
5/30/2006 4:22:31 PM
asp.net.migrate-vs2003-vs2005 590 articles. 0 followers. Follow

2 Replies
790 Views

Similar Articles

[PageSpeed] 42
Get it on Google Play
Get it on Apple App Store

Wow! well i managed to fix it on my own but i would love to know exactly why it was happening...

basically you can leave it at true if you like but you must upgrade CodeBehind to be Codefile...

and then  if you leave it at true (the c# default), page_load will only launch once ...

Which is what is supposed to happen..

If anyone can commnet why... that would be good

See ya


Ian
0
ianspain
5/30/2006 4:59:26 PM
Ok ... found out the problem and fixed it even better.... 

Here is the solution..

In the aspx page there is a page directive that is called "Codebehind", if you leave it like this and leave autoeventwireup to true .. Page_load runs twice... so you have to set to "false" for it to load once..

New pages don't use directive "codebehind" ... they use codefile...

So if i edit them to use "codefile" then everything function as it should i..e false doesn't run ... and true ones once...


0
ianspain
5/31/2006 1:45:02 PM
Reply:

Similar Artilces:

Upgrade/migration issues from VS2003+.NET 1.1 to VS2005+.NET 2.0
Hi,  Visual Studio is great when everything works well and you don't know what is happening under the hood. However when things don't work it is really frustrating since you just don't know what is going on.  I have a project (a web site) that was originally developed for VS2003 and ASP.NET 1.1. When I loaded this project on VS2005 (and ASP.NET 2.0), VS told me that it will migrate it to the new environment: it did a number of things, generated a migration report and created/moved files under App_code and such directories. I tried this process a number of times b...

Migrating VS2003 to VS2005.
Hello, I have recently migrated VS2003 web application(ASP.NET 1.0) to VS2005 (ASP.NET2.0). But after migration I am getting an error saying a particular DLL is not defined. How do I register this DLL in the server so that I can overcome this problem. Note: I have migrated the application which is in different machine(i.e., Shared drive).   Thanks, Renil. You don't have to register the dll on the server.  Just put it in your App_Code folder  and then add a reference to it in Solution Explorer.http://msdn2.microsoft.com/en-us/library/1886a4bb-c9d8-4ba6-8078-04b...

Migrate from VS2003 to VS2005
Hello, please help me with my problem. Projects were successfully migrated from 2003 to 2005. I have VS2005 Team Edition, installed: VS80-KB898904-X86-ENU.exe, VS80-KB915364-X86-ENU.exe, WebApplicationProjectSetup.msi. I tried to open solution. At first I couldn’t open solution at all I have done the next changes: “You will need to change the MSBuild targets in the project file. Open this file with a text editor and replace the VSTO target with this one <Import Project="$(MSBuildExtensionsPath)\Microsoft.VisualStudio.OfficeTools.targets" />”. Now I can open solution but...

Is it possible to migrate VS2005 Web Application Project to VS2005 Web Site.
Good afternoon.On my first project using VS2005, it was a brand new project so we didn't have to face the migration issue.  As we were developing right after VS2005 was released, we created the code using File | New | Web Site.I have now moved onto my second project and this one is a migration from a previously existing .NET 1.1 codebase to .NET 2.0.   We are currently investigating the best approach for migrating this code from VS2003 to VS2005.  We are thinking that at least initially, we might convert the code into a VS2005 Web Application Project using the steps located at...

Migrating a VS2003 project to VS2005
I need to migrate a web project from VS2003 to VS2005. I am a novice user. List down the steps that need to take care before migrating. Is there a tool (don't want that tool in VS2005 setup) that will migrate my solution to 2005 hassle free? Thanks! Viswanth V.G Check out this article:Step-By-Step Guide to Converting Web Projects from Visual Studio .NET 2002/2003 to Visual Studio 2005 Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you! Great link... Thanks a ton! My problem is to convert all the *.vb code files to Partial classes. ...

About migrating the managed Dll from VS2003 to VS2005
Hi everyone!I have a managed C++ Dll which compiled by Visual Studio 2003,and I migrate it to Visual Studio 2005 these days,and call it by some C# applications.Unfortunately it always report error:"is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)",I also can not tarce into it,for once I refer the class in the dll,the C# console application will report that error when I press F5!Please suggess me if any one have solve.Birch Howe First, make sure you are compiling in the proper mode.  Check Visual Studio 2005's Configuration Manager (Build menu, Confi...

Error on migrating webapplication from VS2003 to VS2005
I created web application with C# with VS2003 successfully. Now I pulled the solution to VS2005.  But a build error appears as " It is an error to use a section registred as allowDefinition = " Machine to application" beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS". The error occrurs with in the authentication tag in web.config. I have confiremed that the virtual directory is configurated as an application through virtual directory properties.  Can some one help on this issue?  Can you make sure you...

HTML problems while migrating from VS2003 to VS2005
Hi, all. I tried to get the existing code for my website (originally built on .NET 1.1 using VS2003 as the development tool) to compile within VS2005 for .NET 2.0, but have run into the following problem : The existing code uses include files (i.e. files that are included in .aspx pages using the include macro) that contain inline VB scripting code (for example,  <%=myvariable%> or <% if  IsValidFlag = true then %> ) : The error message is "Character '<' , hexadecimal value 0x3c is illegal in an XML attribute values. If I remove the offending include...

Couldn’t open solution which was migrate from VS2003 to VS2005
Hello, please help me I spend huge time for that problem. I’m trying to run project which was migrated from VS203 to VS2005. I installed VS80-KB915364-X86-ENU.exe, VS80-KB898904-X86-ENU.exe, WebApplicationProjectSetup.msi. When I open the solution I have the same error: --------------------------- Microsoft Visual Studio --------------------------- Unable to read the project file 'SolutionName.csproj'. C:\path\ProjectName.csproj(1585,11): The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confir...

Faced many errors after migration from VS2003 to VS2005
 Dear Forum Members,I have a ASP.NET 1.1 project and it is successfully run. Now i am going to migrate it into 2.0. I used the Migration wizard that is already in VS2005. After migration when i build it, it will return many errors. In the below i listed some of them..1. Error    1    Validation (): Element 'html' occurs too few times.    2. Error    2    Cannot switch views: This end tag has no matching start tag.    3. Error    3    Validation (Internet Explor...

Visual Studio 2005 Crashes after migrating from VS2003 to VS2005
I have migrated my project from vs2003 to vs2005 after installing application project. Everything is very smooth. And my project in vs 2005 can be compiled and run. However, when I use master page and try to drag a third party control component into the design region (in the content page), vs 2005 crashes. Well, this is not the headache yet. So I removed master page. And start running the project in debug mode, I keep getting the error message as listed next. Visual studio is frozen to death. No matter if I restart the visual studio or restart the computer, I keep getting the following infor...

Does anybody know how to migrate a VS2003 WSE2.0 program to VS2005 WSE3.0?
Hello. I'm trying to migrate a VS2003.NET(VB), ASP.NET 1.1, .NET Framework 1.1, WSE 2.0 SP3, IIS 5.1 Web Application to VS2005(VB), ASP.NET 2.0, .Net Framwwork 2.0, WSE 3.0, Web Application. There were some errors which i resolved and still two warnings unresolved, but there is just one outstanding error that i cannot figure out how to fix. In the following function i get the error "'Attachments' is not a member of 'Microsoft.Web.Services3.SoapContext'" on the "doc.load" line.     Private Function GetList(ByVal classID As xatanetconduitwebservice.ClassType, ByVal orgID As ...

Just migrated to VS2005 now can't get VS2003 debugger to work
Hi, I just migrated my project from VS2003 to VS2005. Before I started I backed up my VS2003 solution. I now need to go back to VS2003 for a while (my boss has something urgent he wants doing so don't have time to get it working and do proper testing because of the new CLR 2.0). The problem is that I've restored my VS2003 solution and can't get the VS2003 debugger to start. It says: "Error while trying to run project: Unable to start debugging on the web server". I've looked at the help file but I need to narrow it down a bit (I can't check all that stuff!): Am I looking at a...

Migrating web site (vs2005) to web application (vs2008)
Hi!  I followed http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx tutorial and it seemed that everything was ok. But after successful start I got this exceptions: Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0433: The type 'ASP.banerzone3sm_ascx' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\tisnet\00e65f37\54991e22\App_Web_jr-am_rq.dll...

Web resources about - (Scott?) Migrated Vs2003 to web app vs2005 Page_load fires twice... - asp.net.migrate-vs2003-vs2005

ASP.NET - Wikipedia, the free encyclopedia
ASP.NET is a server-side Web application framework designed for Web development to produce dynamic Web pages . It was developed by Microsoft ...

News
Delivering NSW rugby fans the latest news, rugby match fixtures & results, video and rugby statistics for the Shute Shield - NSW Premier Rugby ...

操作失败信息_Foosun Inc.
System.IO.FileNotFoundException: Could not find file 'D:\wwwroot\2011askci\CIlucenet\search_reports\_1bv.cfs'.File name: 'D:\wwwroot\2011ask ...

FAIL can impress, too
I mentioned that a quick way to setup things for me to think that a candidate is a bad idea is to send us a UI project. This is usually a very ...

C# dotnet SQL editor (codebehind side)
... editor (webform side) I've explained the purpose of this "exercise" and suggested a webform proposal for this diy SQL... protected void Page_Load(object ...

Silverlight, FireFox and 100%
In my last post I mentioned something nice about FireFox. In this post I’ll talk something not that nice about FireFox and the way we, more or ...

Case insensitive compare on string in ASP.NET - Coders Grid
... ; using System.Web.UI.WebControls ; namespace WebApplication1 { public partial class Compare : System. Web . UI . Page { protected void Page_Load ...

Response.Redirect() executes too soon on the Server.
-*+I’ve seen this question a couple of times in various situations. The first involves Javascript and the second involves server side code. Both ...

Boost ASP.NET performance with deferred content loading
A comprehensive example of how to improve the perceived speed of your pages, by implementing user controls to encapsulate secondary content and ...

Visual Studio 11 Beta in Context
... partial class Categories : System.Web.UI.Page { private readonly DemoWhateverDataContext _db = new DemoWhateverDataContext(); public void Page_Load() ...

Resources last updated: 11/30/2015 8:33:03 PM