0

I am trying to embed feed.asp into Page.cshtml. But it doesn't compile the command. Here is the code of the page.

@{

}

<!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>ONC Project Tracking</title>
        <style type="text/css">
        .auto-style1 {
            text-align: center;
            font-family: Verdana, Geneva, Tahoma, sans-serif;
            font-weight: bold;
            color: #800000;
        }
        .auto-style2 {
            text-align: justify;
            font-family: Verdana, Geneva, Tahoma, sans-serif;
        }
        .auto-style3 {
            font-family: Verdana, Geneva, Tahoma, sans-serif;
        }
        .auto-style4 {
            text-align:center;
            margin-left:auto;
            margin-right:auto;
            border: 0px solid black;
        }
        .auto-style4 tr {
            width: 30%;
        }
        .auto-style4 td {
            border: 0px solid black;
            padding: 0px;
            border-collapse:collapse;
            border-spacing: 0px;
        }
        .auto-style5 {
            max-width: 50%;
        }
        .auto-style11 {
            width: 1077px;
            height: 283px;
        }

    </style>
    </head>
    <body>
        <p class="auto-style1">
        Welcome to the ONC project tracking JIRA system</p>
    <p>
        &nbsp;</p>
    <p class="auto-style2">
        Welcome to the ONC project tracking JIRA system. The Nationwide Health Information Network Division of the Office of National Coordinator maintains the system to provide a collaborative environment for the healthcare industry to implement meaningful use requirements. Below please find links to numerous projects that are hosted on the project tracking system, as well as a summary of the hot topics being discussed. Within each project you will find conversations related to implementing specific meaningful use measures.</p>
    <p class="auto-style3">
        If you have questions about meaningful use direct them to <a href="mailto:mindy.hangsleben@hhs.gov">mindy.hangsleben@hhs.gov</a>. If you&#39;re having technical problems with this site please contact onc-jira@ainq.com.</p>

        <hr>

    <table class="auto-style4">
        <tr>
            <td>
                <img alt="" class="auto-style5" src="high-priority-tickets-button.png" /></td>
            <td>
                <img alt="" class="auto-style5" src="hot-tickets-button.png" /></td>
            <td>
                <img alt="" class="auto-style5" src="issues-due-this-week-button.png" /></td>
        </tr>
        <tr>
            <td>
                <img alt="" class="auto-style5" src="create-a-ticket-button.png" /></td>
            <td>
                <img alt="" class="auto-style5" src="latest-tickets-button.png" /></td>
            <td>
                <img alt="" class="auto-style5" src="my-new-tickets-button.png" /></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>
                <img alt="" class="auto-style5" src="my-profile-button.png" /></td>
            <td>&nbsp;</td>
        </tr>
    </table>



   < !--#include virtual="feed.asp"-->

    </body>
</html>

The output has '< !--#include virtual="feed.asp"-->' instead of rendering the content of the asp page.

Omar Shehab
  • 1,004
  • 3
  • 14
  • 26

2 Answers2

1

This just won't work.

If you absolutely have to include this asp file, try using an <iframe> - but even then you will have a pain to get the asp to run in IIS7 (assuming the app runs on IIS7)

Simon
  • 2,810
  • 2
  • 18
  • 23
0

I assume that your project is an ASP.NET C# Web Application of some sort (MVC , Site or otherwise). That means your default page language is C#. If you were able to get a server side include to work, the compiler would expect that the included file also be the same language. You can't mix and match languages.

I assume by the .ASP extension that the file source is in VBScript from classic ASP days? If so, you won't be able to combine classic ASP and ASP.NET.

If for some reason feed.asp IS a .NET file just with the classic extension, Response.WriteFile("myFile.aspx") is a way to include another file but I believe that this file too would need to be in C#. If you were using MVC you could use Html.RenderPartial

Some resources for your reading:

ASP.NET equivalent of server side includes

http://support.microsoft.com/kb/306575

Community
  • 1
  • 1
Nick Bork
  • 4,831
  • 1
  • 24
  • 25