混合ASP.NET与ASP [英] Mixing ASP.NET with ASP

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

问题描述

这可能是一个疯狂的问题(我有​​点新的ASP.NET)。但是,它可能用传统的ASP例如混合ASP.NET code嵌入在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?

推荐答案

ASP页是实际运行在服务器端的独立脚本的基本简单的页面,服务器返回结果。每一页是独自一人。

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网页是被因为他们在一个池中运行连接在一起,一个完整的程序,编译它们都聚集在了许多子目录一个单一的目录,具有特殊的目录和其他选项。运行该页面池处理一些常见的数据,以及会话状态,和其他许多认为。

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.

所以,你可以有你的网站的一个完整的asp.net设置,首先使其运行,然后你也许可以使用一些ASP页面做一些额外的工作,直到他们全部转移到asp.net

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.


  • 您只能使用iframe的技巧,
    加载一个页面到另一个,但
    他们仍然是不同的,我不喜欢这个主意。

  • 您使用一些Ajax技巧来获取和发送数据。没有这样很酷的想法也。

  • 您可以使用
    也是一个公共数据库共享数据。

  • 您可以使用同样的Cookie共享
    数据。

  • 您不能有相同的会话数据(除了像groat.com会话自定义库)。

  • 您可以共享文件。

<% IF Len(SomeString) < 3 then %>
Ok something here
<% end if %>

在这种情况下,code是两个页面上简单的运行,但他们没有在asp.net中嵌入的ASP,是完整的呈现在一个页面在两个中的一个。

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.

#include指令是均有效,但在asp.net不会编译包括文件作为ASP。

The #include Directive is valid on both, but on asp.net is not going to compile the included file as on asp.

他们有键入code的一些常见的方式,但它们是完全不同的,你需要开始变薄不同的,当你去从ASP迁移到asp.net

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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