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

Ask a Question related to ASP.NET General, Design and Development.

  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. Similar Questions and Discussions

    1. 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); ...
    2. 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...
    3. 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 --...
    4. 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"...
    5. 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.
  3. #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

  4. #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" <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

Posting Permissions

  • You may not post new threads
  • You may 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