Ask a Question related to ASP.NET General, Design and Development.
-
Göran Carlefyr #1
Can I compile regular ASP-code in to an aspx-file?
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.
Göran Carlefyr Guest
-
Passing code/data from code-behind to ASPX page
I have the following code in my code-behind file: DataGrid MAPPsDataGrid = (DataGrid)((((((Repeater) sender).Parent).Parent).Parent).Parent); ... -
Code being called twice in my ASPX Code behind??
Hi, I have an ASP.Net application. I have an aspx page with a button that submits the page. In my codebehind I check if it is a postback and... -
using code behind variables in .aspx
avs: If its a WebControl then you can acess it in codebehind already. In codebehind you need this line: yourtableid.width = intWidth --... -
dynamically generate aspx code
As far as dynamically creating bound columns take a look @ http://www.c-sharpcorner.com/Code/2003/June/DisplayBoundColumnBased.asp "Keith Langer"... -
including one aspx file in another aspx file
Is there a way is asp.net that I can include another aspx file ?. We can do this in asp by using include statement. -
Ravikanth[MVP] #2
Can I compile regular ASP-code in to an aspx-file?
YES
code>-----Original Message-----
>Hi everyone, i've heard that aspx-files can be compiled
>code so that the webserver just have to deal with thein>once, is that true?
>
>I'm a complete newbie to .NET, i've never made anythingjust>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>wan't the webserver to deal with the database connection
>in the menu the first time I surf to that specific page.
>
>.
>Ravikanth[MVP] Guest
-
Kevin Spencer #3
Re: Can I compile regular ASP-code in to an aspx-file?
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
[url]http://www.takempis.com[/url]
Big things are made up of
lots of little things.
"Göran Carlefyr" <goran@proserva.com> wrote in message
news:0a9f01c351ca$ac3d7ba0$a401280a@phx.gbl...> 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.
>
Kevin Spencer Guest



Reply With Quote

