codebehind with no inline

  • Thread starter Thread starter Gary Brewer
  • Start date Start date
G

Gary Brewer

Hi,

I often find myself creating ASPX pages in VS.NET that have no 'content' in
the aspx page but normally just have code in the code behind page. For
example, I use this method when I want to return an XML document from an
ASPX page.

My question is, do I have to have this blank ASPX page which simply contains
the codebehind directive? Can I put all my code inline but still get it to
compile into the DLL?

Regards,

Gary
 
My question is, do I have to have this blank ASPX page which simply contains
the codebehind directive? Can I put all my code inline but still get it to
compile into the DLL?

Yes, but the cleaner way would be to write this particular functionality into an HttpHandler
and send your output from there.
 
Back
Top