Can I compile regular ASP-code in to an aspx-file?

  • Thread starter =?iso-8859-1?Q?G=F6ran_Carlefyr?=
  • Start date
?

=?iso-8859-1?Q?G=F6ran_Carlefyr?=

Hi everyone, i've heard that aspx-files can be compiled
code so that the webserver just have to deal with the code
once, is that true?

I'm a complete newbie to .NET, i've never made anything in
ASP.NET but i've been coding ASP for approx. 3 years.

The reason I'm asking is because I have this menu that
have x numbers of database connections and it takes like
one second after the graphics before the menu appears.

That's why I had this question about compiled code, I just
wan't the webserver to deal with the database connection
in the menu the first time I surf to that specific page.
 
K

Kevin Spencer

All code that is run on a web server, whether it's ASP or ASP.Net, is
compiled. ASP uses scripting, which is compiled at run time, each time the
page is requested. ASP.Net uses a variety of options, including compiled
DLLs and code that is compiled at run-time and then cached, to increase
performance. In other words, ASP pages are recompiled with each request,
while ASP.Net pages are compiled once and then cached.

However, this doesn't solve all of your problems. If you have a menu that is
getting its' members from database queries, the code to get the data may be
compiled, yes, but it must still be executed, and the database values have
to be fetched with each request for any page that contains that menu. If the
menu content doesn't change very often, you would probably do best to cache
the data that is fetched for the menu, so that it can be grabbed straight
out of memory, rather than fetching it from the database with each request.
Database hits are one of the most expensive operations an application can
execute.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big things are made up of
lots of little things.
 

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,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top