views:

167

answers:

6

hi everyone...

I want to use asp page in my asp.net application without any modification in asp pages.

further I want to add master page in my .net application.So i need the changes to be reflected in the asp page also.

is it possible....any how? or any alternative to use this..?

pls suhggest me .....thanx in advance...

A: 

This is a duplicate question.

http://stackoverflow.com/questions/868349/using-of-asp-page-with-master-page/868369#868369

Bobby Cannon
Please use comments to include info. about Duplicates, instead.
Cerebrus
Why? An answer is way more visible. I am not trying to gain rep but to get the information out quicker before we end up with duplicate questions and data.
Bobby Cannon
BTW, I vote for this to be closed.
Bobby Cannon
+2  A: 

ASP does not have master pages, so you can't use them. The most sensible thing to do is to rewrite the ASP page in ASP.NET, while there are still people around who understand what the ASP page was meant to do. There will otherwise come a time when nobody understands that page.

The closest thing I've seen to what you're looking for is to write an ASP.NET page that refers to the ASP page through an IFRAME. The ASP.NET page can be a content page, referring to the master page, and the ASP page can stay the same.

John Saunders
how to do that..can you pls tell me something..?
Aarsh Thakur
I'm getting error while loading Asp page in iframe.
Aarsh Thakur
If you want help, then you'll have to say what error you're getting. Also, check to see if you get this error with _all_ ASP pages, or only this one particular ASP page.
John Saunders
+1  A: 
Zaagmans
so any alternative for that sir..?
Aarsh Thakur
no sir I cant do this ...b'coz system is too large to convert.I have to work with limited options.
Aarsh Thakur
There _will_ come a time when this mess of ASP and ASP.NET pages can no longer be maintained. At some point, those ASP pages will either need to be re-written, or discarded. You want this time to arrive while there are still people available who can understand these old pages, not after such people are dead or gone.
John Saunders
Hi John, I write VBScript / classic ASP a lot. So understanding these 'old pages' is no problem for me (if I may say so) and I know what mess it is to combine 'old' with 'new' ;-) So I'm happy to see you agree.
Zaagmans
I don't mean understanding the code, so much as understanding them from a business point of view. Besides, are you immortal? Will you never leave the job? Does the "next guy in line" also have your abilities with classic ASP? I'm not talking about this happening in the next year or so, but I can tell you that fewer and fewer people want to have "Classic ASP" on their resume. You may very well reach a point where you are competing to hire them, and have pay top dollar for them - or maybe not find them at all.
John Saunders
A: 

i have used asp and asp.net vb together when i was learning my method was to use jquery to put my asp classic generated html into designated divs... as my leaning increased i needed to use this method less and less its a great way to pick up asp.net C# when moving from a VB background when you dont really have time to learn, like at work.

minus4
A: 

I think there are thousands of developers that wish for the same thing!

At my company I have to deal with this a LOT as we have some large systems written entirely in Classic ASP, some written entirely in ASP.NET, and some that are hybrid solutions.

Depending on your environment the two can coexist peacefully as long as you don't need to share session state between the two. If you need that, there are a few solutions out there for storing the sessions in a database, but none are very elegant.

Your best bet would be to make a few ASP include files to build a similar look and feel to your Master page, and apply it to your Classic ASP pages until you have the time to rewrite them.

Also, if you have a lot of business logic that you need to share between the two systems, you can take your DLLs and wrap them in COM so your ASP pages can use them too.

Mxyzptlk
A: 

A dirty way: Make a HTTP request from the ASP.NET code to the .asp page and store the response in a web control. It's not pretty, but it works.

João Marcus