Multiple code behind files per aspx page.

S

seannakasone

Hi, is it possible to have multiple code behind files per aspx page? The
reason I'm asking is because I'm trying to build on top of a 3rd party
application. The application has an aspx page with it's code behind in
compiled form, a DLL. So what I want to do is provide another code behind
file, with my code to extend the aspx page. Is this possible?
 
N

Nathan Sokalski

It is possible to have multiple codebehind files, but a *.dll is an
assembly, not a codebehind. A codebehind file contains code for a class.
Once a class is compiled, you cannot modify it (you can inherit it and use
it, but you cannot modify the source code). There are decompilers you can
download that attempt to decompile an assembly back into source code
(although there is no guarantee that the result will look exactly like the
original source code did). Hopefully this helps.
 
B

bruce barker

as pointed out you can decompile the code. or you can write a new class
that inherits form the codebehind class, and change the page to inherit
from the new class.

-- bruce (sqlwork.com)
 
J

Juan T. Llibre

re:
!> Hi, is it possible to have multiple code behind files per aspx page?

No.

What you *can* do is create a class file and compile that into an assembly.
Then, in your code to extend the aspx page, call whatever properties/methods you created.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top