• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 449
  • Last Modified:

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

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
jra2002
Asked:
jra2002
1 Solution
 
mmarinovCommented:
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
 
AerosSagaCommented:
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
 
jra2002Author Commented:
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
AerosSagaCommented:
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
 
jra2002Author Commented:
<!-- #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
 
AerosSagaCommented:
don't put the include line in the user control put the acutal asp from the include file.
0
 
jra2002Author Commented:
I had developed the .Net component to fix this problem. It works
0
 
Computer101Commented:
PAQed, with points refunded (20)

Computer101
E-E Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now