473,569 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New Code without Recompilation - how can this be done?

Hi. I have been asked to do a rather odd thing by my employer. I have
to add a new feature to an old project that "should not know about the
change". This is a bit of an odd request but just assume that my
reasons for doing what I need to do cannot change.

Assume that I need to add a list box to the pre-existing project page
that uses some server code to grab its value.

The ony way I can think of doing this is to open notepad on
the given aspx file (Default.aspx) and add a client script with an
ajax call to some server page that handles the request and returns the
value that needs to go in the text box.

The question I have - is it possible to place the AJAX server page
under the root level of the project that I cannot recomplie? Will this
work? Does the project need to "know" about the ajax page or can it
live in the project without it being complied code? Or, do I have to
make a call external to the "non-recomplied" project?

In essense, how can i add a list box to a pre-existing project and
call values from new server code without recompiling the project?

I know this is weird but it is what I have been asked to do. :(

Please help!!

Thanks.
Jun 30 '08 #1
1 1213
On Jun 29, 9:14*pm, pbd22 <dush...@gmail. comwrote:
Hi. I have been asked to do a rather odd thing by my employer. I have
to add a new feature to an old project that "should not know about the
change". This is a bit of an odd request but just assume that my
reasons for doing what I need to do cannot change.

Assume that I need to add a list box to the pre-existing project page
that uses some server code to grab its value.

The ony way I can think of doing this is to open notepad on
the given aspx file (Default.aspx) and add a client script with an
ajax call to some server page that handles the request and returns the
value that needs to go in the text box.

The question I have - is it possible to place the AJAX server page
under the root level of the project that I cannot recomplie? Will this
work? Does the project need to "know" about the ajax page or can it
live in the project without it being complied code? Or, do I have to
make a call external to the "non-recomplied" project?

In essense, how can i add a list box to a pre-existing project and
call values from new server code without recompiling the project?

I know this is weird but it is what I have been asked to do. :(

Please help!!

Thanks.
Hi,

Well you might be even more surprised to know that it can be done :)
First, you need to modify the aspx, in there you change the @page
directive and especifically the Inherits attribute , you set the new
value to the name of a class you are going to create: MyClassA

then you make this new class inherit from the "old" class:
so if you have this:
<%@ Page Language="C#" Codebehind="Def ault.aspx.cs"
Inherits="Defau lt" %>
and n the code behind:
public partial class Default: Page

you end with
<%@ Page Language="C#" Codebehind="Def ault1.aspx.cs"
Inherits="myNew Page" %>
and n the code behind:
public partial class myNewPage: Default
Jun 30 '08 #2

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

Similar topics

1
1841
by: Andy | last post by:
I am trying to create an OsCommerce plugin that parses a number of files and adds them to the catalog. I need some method of transferring the files to be parsed to the server with OsC. Ideally, I would like to send these as a zip file, but in order to keep the installation requirements and user knowledge requirements to a minimum I would...
19
3220
by: Vinod | last post by:
Hi, I have got a peculiar requirement. I want to distinquish between the color codes. I have got two text fields and i will enter the color codes there. The first text field will have background color The second will have text color. I want to validate if background color is dark then only light colors should
1
8495
by: nate.hughes | last post by:
Ok, here's my dilemma. We're running SQL Server 2000 with the default db setting for the ANSI_WARNINGS option set to off. However, we still get "Warning: Null value is eliminated by an aggregate or other SET operation" messages. To eliminate getting the message, we use the SET ANSI_WARNINGS OFF in our stored procs. Using that SET command...
0
1534
by: nate.hughes | last post by:
Ok, here's my dilemma. We're running SQL Server 2000 with the default db setting for the ANSI_WARNINGS option set to off. However, we still get "Warning: Null value is eliminated by an aggregate or other SET operation" messages. To eliminate getting the message, we use the SET ANSI_WARNINGS OFF in our stored procs. Using that SET command...
3
1265
by: arunal2001 | last post by:
Hi all, I have a situation something like this Class A { private data ...... public functions f1();
5
2813
by: Jason Collins | last post by:
There are a number of stored procedures involved in sql server based session maintenance: - TempUpdateStateItemShort - TempResetTimeout - TempUpdateStateItemLong etc. These stored procs are executed by the framework, e.g., exec TempResetTimeout @id = '1iucllii0f42ksvfg4zsajae00000001'
29
3662
by: John Rivers | last post by:
Hello, What good reason there is for not allowing methods in ASPX pages I can't imagine, but here is how to get around that limitation: (START) <body MS_POSITIONING="FlowLayout"> <form id="Form1" method="post" runat="server"> <%
4
1388
by: VB Programmer | last post by:
For a 2003 ASP.NET site, when is recompilation of the site on the server done? Only after the site is updated, or every time there has been a lull in visits and someone visits it for the first time? Thanks.
6
1471
by: Abubakar | last post by:
Hi, I'm working on a project in unmanaged c++. I was writing all (most of) my code in header files, that is, no seperation of code in header and cpp files, as usually is done in c++. I feel pretty comfortable doing this as it my first time writing code in c++. My background is in C#. Now one senior guy ( a non-developer ), came up and wanted...
0
7711
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7628
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...
0
7938
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8145
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...
1
5519
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...
0
5245
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1236
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
970
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...

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.