从 ASP.net 页面向供应商经典 ASP 页面执行 POST。可能的?
我必须转换一些 ASP 页面(到 ASP.net),这些页面为数据库中的隐藏输入值设置值,并对供应商网站上托管的 ASP 页面执行 POST 操作。
我已经发现 ASP.net 页面可以发布到除自身之外的网页...我的问题是关于发送端是 ASP.net 和接收端是经典 ASP 的兼容性问题。是否可以从 ASP.net 页面发布到供应商站点上的经典 ASP 页面?
I have to convert a few ASP pages (to ASP.net) that set values for hidden input values from a database and does a POST to an ASP page hosted on a vendors website.
I already have found that ASP.net pages can post to webpage other than themselves... My question is in regards to compatibility problems with the sending end being ASP.net and the recieving end being classic ASP. Is it possible to post from an ASP.net page to a classic ASP page that's on the vendors site?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这很有可能。
POST 是一种由 HTTP 协议定义的请求机制 - 它与技术无关。归根结底,网页只是一堆 HTML 和脚本,无论呈现它的技术如何。
您可能会获得 ASP.Net 放入表单中的一些额外数据,但除此之外,您没有理由不能发布到您想要的任何网址。请注意,您不会共享会话状态或应用程序变量,并且您可能必须手动构造一个表单或编写自己的表单控件(使用带有“runat=server”的一个表单标记的常规模式不会有帮助,因为这将其设置为进行回发)。
Yes, it's quite possible.
POST is a request mechanism defined by the HTTP protocol - it's technology agnostic. A web page at the end of the day is just a bunch of HTML and script, regardless of the technology that rendered it.
You may get some extra data that ASP.Net puts into your forms, but otherwise there's no reason you can't post to any web address you want. Note that you won't be sharing session state or application variables, and you may have to manually construct a form or write your own form control (the regular pattern of having one form tag with "runat=server" won't help, because this sets it up to do a postback).