Professional Web Applications Themes

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

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 ...

  1. #1

    Default 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

  2. #2

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


    YES

    >-----Original Message-----
    >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.
    >
    >.
    >
    Ravikanth[MVP] Guest

  3. #3

    Default 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" <goranproserva.com> wrote in message
    news:0a9f01c351ca$ac3d7ba0$a401280aphx.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

Similar Threads

  1. Passing code/data from code-behind to ASPX page
    By A. Atienza in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: December 8th, 06:29 PM
  2. Code being called twice in my ASPX Code behind??
    By C in forum ASP.NET General
    Replies: 2
    Last Post: August 6th, 04:13 AM
  3. using code behind variables in .aspx
    By Elliot Rodriguez in forum ASP.NET General
    Replies: 0
    Last Post: July 31st, 03:23 PM
  4. dynamically generate aspx code
    By Sonali.NET[MVP] in forum ASP.NET Data Grid Control
    Replies: 3
    Last Post: July 19th, 11:02 AM
  5. including one aspx file in another aspx file
    By vish in forum ASP.NET General
    Replies: 2
    Last Post: July 16th, 10:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139