Mixing ASP.NET with ASP(将 ASP.NET 与 ASP 混合)
问题描述
This might be a crazy question (I'm somewhat new to ASP.NET). But is it possible to mix ASP.NET code with classic ASP e.g. embedded a form created in ASP.NET in a classic ASP page?
No you can not*
asp pages are basic simple pages that are actually running stand alone scripts on server side, and server returns the result. Every page is alone.
asp.net pages are a complete program that are connected together because they running under one pool, compile them all together in a single directory with many sub-directories, have special directories and other options. The pool that run the pages handle some common data, and session states, and many other thinks.
So you can have a full asp.net setup for your site, that first make it run, and then you can probably use some asp page to do some extra work until you transfer them all to asp.net
So the two are not have any relative together, so in simple answer you can not embedd anything from one to the other.
Ways of sharing data between asp and asp.net
- You only can use iframe tricks to load one page into the other, but they still different and I do not like the idea.
- You use some ajax tricks to get and send data. No so cool idea also.
- You can use also a common database to share data.
- You can use same cookies to share data.
- You can not have the same session data (except with custom library for session like groat.com).
- You can share files.
* Except if you code is so simple like
<% IF Len(SomeString) < 3 then %>
Ok something here
<% end if %>
In this case the code is simple running on both pages, but they are not embedded asp in asp.net, is complete render one page over one of the two.
The #include Directive is valid on both, but on asp.net is not going to compile the included file as on asp.
They have some common way of typing code but they are totally different, and you need start thinning different when you go to move from asp to asp.net
这篇关于将 ASP.NET 与 ASP 混合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 ASP.NET 与 ASP 混合


基础教程推荐
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 如何激活MC67中的红灯 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01