473,383 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

HOW TO Use asp Include in ASP.NET ?

Hi ,

can I use an asp (not aspx) file as include in my aspx files ?

lets say that I have a regular asp file that hold few functions , params
(dim x etc ....) and cost's

and i don't want to rewrite this file as aspx so how can i use it in my aspx
files ?

Thanks In Advanced

Tiraman .
Nov 18 '05 #1
5 885
nope... differenet parsers

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Tiraman" <ti*****@netvision.net.il> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi ,

can I use an asp (not aspx) file as include in my aspx files ?

lets say that I have a regular asp file that hold few functions , params
(dim x etc ....) and cost's

and i don't want to rewrite this file as aspx so how can i use it in my aspx files ?

Thanks In Advanced

Tiraman .

Nov 18 '05 #2
If the .asp file happens to contain only things that are valid in asp.net
(i.e. you would be able to convert it to a .aspx just by changing the
extension), then sure.

"Tiraman" <ti*****@netvision.net.il> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi ,

can I use an asp (not aspx) file as include in my aspx files ?

lets say that I have a regular asp file that hold few functions , params
(dim x etc ....) and cost's

and i don't want to rewrite this file as aspx so how can i use it in my aspx files ?

Thanks In Advanced

Tiraman .

Nov 18 '05 #3
Consider using a class to hold your functions etc
A
"Tiraman" <ti*****@netvision.net.il> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi ,

can I use an asp (not aspx) file as include in my aspx files ?

lets say that I have a regular asp file that hold few functions , params
(dim x etc ....) and cost's

and i don't want to rewrite this file as aspx so how can i use it in my aspx files ?

Thanks In Advanced

Tiraman .

Nov 18 '05 #4
Thanks for all your suggestions.

Hi Tiraman,

In ASP.NET it still have its serverside include diretive which help to
embeded some common page template into the asp.net webpage.

#Server-Side Include Directive Syntax
http://msdn.microsoft.com/library/en...ver-sideinclud
edirectivesyntax.asp?frame=true

However, as for your situation, you have some classic vb script function in
your old include file. I think its better to rewrite it via donet
programming language( just as Andrew has suggest) because vbscript is no
longer the serverside programming language in asp.net. Also, asp.net
provide the UserControl which also help include some reusable page content
or logics in common pages.

#Including a User Control in a Web Forms Page
http://msdn.microsoft.com/library/en...udingpageletco
ntrolinanotherwebformspage.asp?frame=true

In addition ,here are some other tech articles on the related topics.
#Simulating include Files with an ASP.NET Server Control
http://msdn.microsoft.com/library/en...ulatinginclude
.asp?frame=true

#Migrating to ASP.NET: Key Considerations
http://msdn.microsoft.com/library/en...issues.asp?fra
me=true#aspnetmigrissues_intro

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5
Hi ,

10x to all of you :-)

bye

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:bb*************@cpmsftngxa06.phx.gbl...
Thanks for all your suggestions.

Hi Tiraman,

In ASP.NET it still have its serverside include diretive which help to
embeded some common page template into the asp.net webpage.

#Server-Side Include Directive Syntax
http://msdn.microsoft.com/library/en...ver-sideinclud edirectivesyntax.asp?frame=true

However, as for your situation, you have some classic vb script function in your old include file. I think its better to rewrite it via donet
programming language( just as Andrew has suggest) because vbscript is no
longer the serverside programming language in asp.net. Also, asp.net
provide the UserControl which also help include some reusable page content
or logics in common pages.

#Including a User Control in a Web Forms Page
http://msdn.microsoft.com/library/en...udingpageletco ntrolinanotherwebformspage.asp?frame=true

In addition ,here are some other tech articles on the related topics.
#Simulating include Files with an ASP.NET Server Control
http://msdn.microsoft.com/library/en...ulatinginclude asp?frame=true

#Migrating to ASP.NET: Key Considerations
http://msdn.microsoft.com/library/en...issues.asp?fra me=true#aspnetmigrissues_intro

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
by: steve | last post by:
I am quite frustrated with php’s include, as I have spent a ton of time on it already... anyone can tell me why it was designed like this (or something I don’t get)? The path in include is...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
60
by: Derrick Coetzee | last post by:
It seems like, in every C source file I've ever seen, there has been a very definite include order, as follows: - include system headers - include application headers - include the header...
9
by: zolli | last post by:
Hi, I've been banging my head against this for a while now. Hoping someone here can shed some light on what's going on. On including stdlib.h in a file, I'm seeing the following errors: ...
5
by: David Mathog | last post by:
One thing that can make porting C code from one platform to another miserable is #include. In particular, the need to either place the path to an included file within the #include statement or to...
1
by: Minh | last post by:
I've just installed VS.NET 2003 on my Athlon XP 1800+. However I couldn't get any project with STL includes to compile even if I create a new empty project (and added #include <string>). It gave me...
1
by: ya man | last post by:
when i use #include <iostream.h> in some files i get lots of error messages of the kind 'ambiguous symbol this is solved when i use #include <iostream why is that ? and can i use #include...
3
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include...
14
by: Jon Rea | last post by:
I am currently cleaning up an application which was origainlly hashed together with speed of coding in mind and therefore contains quite a few "hacky" shortcuts. As part of this "revamping"...
7
by: Giancarlo Bassi | last post by:
Please, what are here the 11 include files (found over the internet)? */mozzarella.c /* #include #include #include #include #include #include
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.