Solved

Can I include asp page in Asp.net page (.aspx)? How?

Posted on 2004-08-18
9
429 Views
Last Modified: 2013-11-18
I have the following file in asp

<!-- #include virtual="/Common/ESW_PWD/oESWInc.asp" -->

Can i include in asp.net page (aspx)

Then where should I include and what is Syntax

Thanks
0
Comment
Question by:jra2002
9 Comments
 
LVL 28

Expert Comment

by:mmarinov
ID: 11830276
the answer is NO


but you can insert in aspx page ascx file which is User Control
http://msdn.microsoft.com/library/en-us/vbcon/html/vbtskaddingusercontrolstowebformspage.asp

Regards,
B..M
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11830385
To  expand on mmarinov's post you create a user control, which is much like an old school includes.  In that User Control you can embed you existing asp.  So its kind of a work around to do what you want.  You just have to think about it a little differently in .NET.

Regards,

Aeros
0
 

Author Comment

by:jra2002
ID: 11830634
Can you send me some sample code.

Because in the current project which is in .net I have to use the common code which is in classic asp

Thanks
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11830659
Well really you already have the code, just open Visual Studio and Create a New User control.  Paste the asp into the html of the user control, then drag your user control onto your webform; .aspx page where you want it to be rendered.

Regards,

Aeros
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:jra2002
ID: 11831418
<!-- #include virtual="/Common/ESW_PWD/oESWInc.asp" -->

I think some syntax error is there. When I do like this then I am getting the above line as a comment line
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11831479
don't put the include line in the user control put the acutal asp from the include file.
0
 

Author Comment

by:jra2002
ID: 11834451
I had developed the .Net component to fix this problem. It works
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12117264
PAQed, with points refunded (20)

Computer101
E-E Admin
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

746 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now