Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 23rd, 2007, 08:26 AM
Authorized User
Join Date: May 2007
Location: pune, maharashtra, India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can we extend the precompiled & deployed applicati

I have precompiled my website application and also deployed it on the server
but if I extend the application in future. then should i precompile and deploy the whole
application again or is there any another way to do it.

Amol Chikurte
Amol Chikurte
  #2 (permalink)  
Old August 23rd, 2007, 09:28 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Simply changing the literal HTML of an ASPX or ASCX file doesn't require re-compiling if the full file is part of the site.

If you need to change some compiled code you can use what I call the "patch method":
- Take the original codebehind file and change the class name (for example change "mypage" to "mypage_patch"). This step is important because the runtime would get a class name ambiguity because the same class would also exist in the precompiled assembly.
- Change the @ Page directive to use the "Src" attribute instead of the "CodeFile" attribute. The value can remain the same.
- Change the @ Page directive "Inherits" attribute to the new class name from the first step. This changes the page to use the dynamically compiled class instead of the precompiled version in the assembly.
- Make the necessary changes to the codebehind files.
(Important note: When using VB, you might need to remove the namespace prefix in the "Inherits" attribute value. A VB project specifies a default namespace for the project and the individual .vb files don't include the namespace blocks around the code.)
- Deploy the changed ASPX/ASCX files along with the codebehind files.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Precompiled Usercontrols ramki16 ASP.NET 2.0 Professional 0 April 9th, 2008 04:21 AM
Deploy Changes in already deployed server khishores C# 2005 0 February 4th, 2008 05:37 PM
Publishing - Precompiled updatable site timType3 Visual Studio 2005 0 August 14th, 2006 09:31 AM
How to monitor Website Info from Windows Applicati Awsok General .NET 0 March 3rd, 2005 11:30 AM
How to Use Precompiled OBJ johan_yo Visual C++ 2 July 26th, 2003 02:23 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.