Learn how to a build a cloud-first strategyRegister Now


include .asp functions in asp.net

Posted on 2005-04-28
Medium Priority
Last Modified: 2013-11-25
i have an old asp include file that is still used from some asp pages, and we'd like to keep using this file instead of .net (some guys decided to hardcode array values that need to be stored on the page) ...

there is no way to compile vbscript code inside .net .. how can I inlcude a ".inc" file, without having to modify it and still call the functions from that .inc file?

Question by:SeanGraflund
  • 2
LVL 35

Expert Comment

ID: 13888073
you can use <!-- #Include File="MyFile.inc" --> to include the file, but you can't really mix ASP.NET with Classic ASP.

Also i would like to mention that using .inc files is not very secure and it's better to rename your .inc files to .asp

LVL 35

Accepted Solution

YZlat earned 200 total points
ID: 13888098
why don't you convert your .inc file to .aspx file and use include statements to include it,
or even better-create User Control (.ascx file) which is equivalent to asp include file in .NET

Since you are starting to use .NET it would be a good idea to start now

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question