codebehind with no inline

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
 
L

Laidbak

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.
 

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

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top