Announcement

Collapse
No announcement yet.

Code behind DLLs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Code behind DLLs

    For those pros out there in ASP.NET: Should moving from in-line VB or C# (within an ASPX page) to a compiled code behind DLL make the pages faster? I'm looking at moving some of my stuff to code behind. I like the idea of having all my code in one DLL for several pages, but I was hoping that if I do it I will also see some speed improvement. What are the experiences of others?

    Also: In looking at how to do it, is there a way to specify which DLL file? It seems like you just specify what class. That would seem to mean that at run time the server needs to look through all the DLLs in the BIN directory and find the class you are referencing. In my head I think there has to be a better way...

    Steve

  • #2
    You add an 'Assembly' directive to your web page to load the dll. Example from one of my pages:

    HTML Code:
    <%@ Page Language="VB" AutoEventWireup="false" EnableViewState="false" %>
    <%@ Assembly Name="tenHsServerClass" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    tenholde
    tenholde

    Comment


    • #3
      Tenholde,

      Thanks for that. Sorry to be dense, but... Is the Assembly Name the name of the DLL? (I should probably go over to MSDN and figure it out myself )

      Do you have any thoughts on my main question? Do you think pages are faster?

      Thanks again.

      Steve

      Comment


      • #4
        I believe it is the dll file name.

        tenholde
        tenholde

        Comment

        Unconfigured PHP Module

        Collapse

        Working...
        X