POST HTML<表单>到外部 aspx 页面表单>
我已经通读了此内容。但是,就我而言,我发布到的页面是外部 .aspx 页面。
基本上,我使用 XElement
在源页面代码上生成 XML 数据,并且需要将其 POST 到外部 .aspx > 页面。要求表示在发布之前需要将其包装在 HTML 标记中。所以我的代码隐藏文件中的字符串看起来像
<FORM id="frmLogin" action="https://illustration.sagicorlifeusa.com/fse5/main/FormPost.aspx" method="post" target=blank>
<XML>myxml<XML\>
<input type="submit" name="__exclude__Submit" value="Run Sagicor Life Illustration Software Online ">
</form>
现在在代码隐藏文件中,我需要做什么,才能将其发布到外部 .aspx 页面?
I have already read through this. However, in my case the page I am posting to is an external .aspx page.
Basically I generate XML data on the source page code with XElement
, and need to POST that to an external .aspx page. The requirement say it needs to be wrapped in HTML </form>
tag before posting. So my string in the code-behind file looks like
<FORM id="frmLogin" action="https://illustration.sagicorlifeusa.com/fse5/main/FormPost.aspx" method="post" target=blank>
<XML>myxml<XML\>
<input type="submit" name="__exclude__Submit" value="Run Sagicor Life Illustration Software Online ">
</form>
Now on the code-behind file, what is it that I need to do, to post this to the external .aspx page?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以添加隐藏输入,在代码隐藏中设置其值并将表单发布到目标页面,以便可以在该页面上提取回该值。我明白你的问题了吗?
You can add a hidden input, set its value in codebehind and post the form to the destination page so that on that page the value can be extracted back. Did i understand your question?
这没有道理。您通常不会发布 HTML 代码。
您应该检查他们真正想要的要求。我的猜测是,如果您从浏览器发布它,您会将其放入 HTML 标记中,但如果您从服务器发布它,则不适用。
That doesn't make sense. You normally don't post HTML code.
You should check the requirement for what they really want. My guess is that you would put it in an HTML tag if you post it from the browser, but that would not apply if you post it from the server.