Multiple code behind files per aspx page.

  • Thread starter Thread starter seannakasone
  • Start date Start date
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?
 
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.
 
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)
 
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/
=========================
 
Back
Top