Chapter 3 - ASP.NET 2.0 Website programming (TheBeerHouse)

Last post 05-11-2009 9:57 AM by Lee Dumond. 1 replies.

Sort Posts:

  • Chapter 3 - ASP.NET 2.0 Website programming (TheBeerHouse)

    05-11-2009, 2:44 AM
    • Member
      409 point Member
    • khparhami
    • Member since 04-09-2009, 5:19 AM
    • Tehran
    • Posts 189

    Hi ,

    I am busy reading and coding the book "Wrox - ASP.NET 2.0 Website Programming Problem Design Solution" and at the end of chapter 3 ther is an important note as follow, that I didn't understand clearly if I should create a new seprate project inside the existing project , and how can I refrence the project to it. the class  WebCustom Event  should be made inside this new project.

     

    here is the note:

    Note that for custom events to be dynamically loaded correctly when the application starts, they

    must be placed in their own pre-compiled assembly. This is because the ASP.NET runtimes try to

    load them before the App_Code files are dynamically compiled, so the custom event type

    wouldn't be found if you placed the source code there. Because of this, you must create a

    separate secondary project for the source code, and reference the compiled .
    dll file (namedMB.TheBeerHouse.Custom Events.dll) from the main web project. If you add the Library

    Project to the solution containing the web project, you'll be able to reference the project instead of

    the compiled file, so that an updated version of the DLL will be generated and copied into the web

    project's bin folder every time you compile the solution.

    Best regards
    Khashayar

    ---------------------------------------------
    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
  • Re: Chapter 3 - ASP.NET 2.0 Website programming (TheBeerHouse)

    05-11-2009, 9:57 AM
    • Contributor
      6,366 point Contributor
    • Lee Dumond
    • Member since 11-03-2004, 10:51 AM
    • Decatur, IL USA
    • Posts 1,168

    Just do exactly as the book says:

    "If you add the Library Project to the solution containing the web project, you'll be able to reference the project..."

    That means to add the project inside the existing solution, then add a reference to the new project from the web site (Add Reference, Browse Tab, click on the project).

Page 1 of 1 (2 items)