可以混合使用ASP和ASP.NET吗? [英] Can you mix ASP and ASP.NET?

查看:88
本文介绍了可以混合使用ASP和ASP.NET吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个将 .aspx 用于页面的移动网站上;但是,我正在从旧的 .asp 页传输信息.这些.asp页正在读取数据库连接,我不清楚如何将它们转换为.aspx页,而不会遇到配置错误,这些错误在我修复时尚不清楚.

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.

在站点中混合.asp和.aspx页面是否是错误的做法?如果没有,如何学习更好地理解从.asp数据库连接到.aspx的转换差异?这是我目前在此站点上遇到的唯一障碍,当我在这里停留了一段时间后,我很想尽快找到解决方案.

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.

该站点可以正常运行,但我希望与页面中设置的.aspx保持一致.感谢您可能提供的任何帮助,谢谢.

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.

推荐答案

您可以绝对将ASP页面与ASP.NET页面混合使用.我已经在没有时间重新设计但需要添加一些功能的内部站点上做到了.请注意,您不能在两种类型的页面之间共享会话状态(我使用Cookie来解决此问题),但是两个页面可以一起生活在同一网站中.

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.

通常,ASP页的数据库连接都保存在global.asa文件或包括在include文件中,甚至直接保存在asp页本身中.当您迁移功能以将所有这些连接放在一个逻辑位置时,这将很有帮助.

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.

目前还没有从ASP到ASP.NET的直接转换,如果您还没有ASP.NET的丰富经验,那么值得探索一些示例/教程以了解ASP.NET Web的方式.现场工程.关于如何连接到数据库,有很多选项.请访问www.asp.net来了解它们.

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.

这篇关于可以混合使用ASP和ASP.NET吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆