Solved

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

Posted on 2004-08-18
9
434 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
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…
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…

733 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