当我将 ASP.NET .aspx 页面的输出包含在 HTML 页面中时,我需要做什么? 类似于 的东西
我有一个 ASP.NET 文件,位于 http://localhost/nn/n.aspx 处理该文件的输出包含在 http://localhost/index.asp。
我是否应该做一些一般或特定的事情,以便客户端上的 ASP.NET 代码知道它是什么?
设置
我想也许这就是 ScriptManager 的 ScriptPath,我也许可以弄清楚。
但我担心可能还有其他问题,我希望有类似 HTML 标签的东西,我可以用它来告诉我的客户端代码它在哪里。
谢谢 奥拉夫
I have a ASP.NET file at
http://localhost/nn/n.aspx
Output from processing that file is included in
http://localhost/index.asp.
Is there some general or specific things I should do so that the ASP.NET code sitting on the client knows were it is?
Setting <form action="http://localhost/nn/n.aspx
makes it post to the right location, but my update-panel is failing.
I think perhaps that's the ScriptPath of the ScriptManager, and i can probably figure that out.
But I am afraid there could be other issues, and i am hoping there is something like the HTML tag that i can use to tell my client code where it is.
Thanks
Olav
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
A)。 “..处理该文件的输出包含在..”中到底是什么意思?
B).
标签是邪恶的 html 味道,它导致的问题比它们解决的问题还要多,并且是失败架构的症状C)。 HTML 页面是什么意思? 普通的 HTML 页面不可能包含 .aspx 内容,HTML 不是服务器端语言。 方法和手段当然有,但要具体。
D)。 您需要向我们提供有关您的代码和站点架构的更多信息,这里没有足够的信息来解决“我的更新面板失败”确实非常模糊。 怎么失败了?
A). What exactly does "..Output from processing that file is included in.." mean?
B).
<base>
tags are evil html-smells which cause more problems than they solve and are the symptom of a failed architectureC). What do you mean by HTML page? There's no way a normal HTML page can include .aspx content, HTML is not a server side language. Certainly there are ways and means, but you need to be specific.
D). you need to give us some more idea about your code and site architecture, there's not enough info here to work this out "my update-panel is failing" is very vague indeed. How is it failing?
您想要创建服务器端控件吗? 您不可以将一个 ASPX 文件的“处理输出”包含在另一个 ASPX 文件中。 相反,您创建一个 ASCX 文件 - 一个服务器端控件,然后将其合并到目标 ASPX 文件中。
这很容易做到,而且很可能就是您正在寻找的。 不过,你的问题很模糊,所以我无法确定!
Are you looking to create a server-side control? You don't include "output from processing" one ASPX file in another one. Instead, you create an ASCX file - a server side control and then incorporate that in the target ASPX file.
It is easy to do and may well be what you are looking for. However, your question is quite ambiguous so I cannot tell for sure!