Converting from ASP to ASP.NET

Last post 05-07-2008 12:55 PM by imbrod. 4 replies.

Sort Posts:

  • Converting from ASP to ASP.NET

    05-01-2008, 1:25 PM
    • Member
      6 point Member
    • jahunt
    • Member since 02-20-2008, 2:01 PM
    • Posts 39

    Hi,

    When converting ASP to ASP.NET using the conversion tool in VWD 2008 Express I'm getting some problems and errors.  One of my problems is compiling the site it doesn't like this:

    <!--#include virtual="/include/globalnav(tp_cust).aspx" -->

    and gives me this error:

    Build (web): Failed to map the path '/include/globalnav(tp_cust).aspx'.

    How do I fix this problem?

  • Re: Converting from ASP to ASP.NET

    05-01-2008, 2:54 PM
    Answer
    • Star
      14,584 point Star
    • david wendelken
    • Member since 07-27-2005, 11:47 PM
    • Fayetteville, NC, USA
    • Posts 2,076
    • Moderator

     

    Is this directory inside your website?  If so, you might need to precede it with a ~ character, which would mean that the include directory is directly underneath the website's root directory.
    If this answered your question, be sure to mark it as the answer. That way, everybody after you will know it's the answer also!
  • Re: Converting from ASP to ASP.NET

    05-01-2008, 2:56 PM
    Answer
    • Star
      10,643 point Star
    • ps2goat
    • Member since 11-17-2006, 10:43 PM
    • Posts 1,942

    You should probably convert the site so it makes use of MasterPages, rather than use includes.

    But your problem is that you are telling the system to map a virtual path, but "/include/globalnav(tp_cust).aspx" is not a virtual path.  A virtual path uses "~/" to signify the root of the application.

    If your app structure is MyAppFolder/include/globalnav(tp_cust).aspx "~/include/globalnav(tp_cust).aspx"

    ---------------------------------------
    MCP - Web Based Client Development .NET 2.0
  • Re: Converting from ASP to ASP.NET

    05-02-2008, 11:05 AM
    Answer
    • Member
      160 point Member
    • imbrod
    • Member since 10-27-2004, 4:43 AM
    • Posts 221

    try:

    <!--# include file="/includes...

    I love spaghetti (both code and food)!
  • Re: Converting from ASP to ASP.NET

    05-07-2008, 12:55 PM
    • Member
      160 point Member
    • imbrod
    • Member since 10-27-2004, 4:43 AM
    • Posts 221

     I just tried the Netcoole ASP2ASPX software and I was surprised to learn something when I analyzed the code it produces:

    Most of the ASP spaghetti code lines are intact and they seem to be working fine!

    Of course, there is declaration of variables and converted functions in the script tag, but as I manually replaced some minor things (connection to appropriate ADO.NET connection , recordsets to commands+repeaters, FSO to class File etc.) it worked like charm!

    I was amazed since I thought spaghetti code is forbidden in .NET! 

    I love spaghetti (both code and food)!
Page 1 of 1 (5 items)