Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you mix ASP and ASP.NET?

I am working on a mobile site that uses .aspx for the pages; however, I am transferring information from older .asp pages. These .asp pages are reading database connections, and I am not clear how to convert these into .aspx pages without running into config errors that are unclear to me in fixing.

Is it bad practice to mix .asp and .aspx pages in a site? If not, how can I learn to better understand the conversion differences from .asp database connections to .aspx? This is the only obstacle I have going on at the moment with this site, and I would love to find a solution soon as I've been stuck here for a while.

The site works, but I would like to be consistent with the .aspx set up in pages. I appreciate any help you may have to offer, thank you.

like image 978
creativeedg10 Avatar asked Apr 22 '11 13:04

creativeedg10


People also ask

Is ASP and ASP.NET same?

No. ASP or also popularly known as Classic ASP developed by Microsoft is first Server-side scripting engine which is used for dynamic generation of web pages. ASP.NET, on the other hand, is a server-side web framework, open-source, which is designed for the generation of dynamic web pages.

Can we use ASPX page in MVC?

If you add a plain ASPX page to an ASP.NET MVC project, well, it just works like a charm without any changes to the configuration. If you invoke the ASPX page, the ASPX page is processed with viewstate and postbacks.

What is ASP and ASP.NET explain the ASP.NET architecture?

ASP.NET is a web application framework designed and developed by Microsoft. ASP.NET is open source and a subset of the . NET Framework and successor of the classic ASP(Active Server Pages). With version 1.0 of the . NET Framework, it was first released in January 2002.


1 Answers

You can absolutely mix ASP pages with ASP.NET pages. I've done it for internal sites where we didn't have time to redesign, but needed to add some functionality. Note that you can't share session state between the two types of pages (I worked around this using cookies) but the two pages can live together in the same web site without an issue.

Often ASP pages will have database connections kept in the global.asa file or perhaps in an include file, or even right within the asp pages themselves. It would be helpful as you migrate functionality to have all those connections in one logical place.

There is no straight conversion to ASP.NET from ASP, and if you don't have much experience yet with ASP.NET it would be worthwhile to explore some samples / tutorials to get an understanding of how an ASP.NET Web site works. There are lots of options for how you connect to your database. Have a look at www.asp.net to learn about them.

like image 104
Ken Pespisa Avatar answered Sep 22 '22 14:09

Ken Pespisa