自动从C#代码中发布表单,无需单击提交按钮 [英] Post a form from C# code behind automatically without clicking the submit button

查看:93
本文介绍了自动从C#代码中发布表单,无需单击提交按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不单击提交"按钮并将表单操作设置为ASP页面的情况下自动从页面后面的代码中发布表单?

我们的网站仍然大部分是用ASP编写的,我们需要在ASP和Dot Net之间来回移动.

我正在将请求变量从ASP发送到点网页面,我在点网中设置了会话变量,然后希望将相同的请求变量发送回另一个ASP页面.

当我尝试Server.Transfer时,它仅在我转移到另一个Dot Net页面时才起作用,但是当我尝试转移到ASP页面时却给出了错误.

谢谢!
Ornitte

How can I post a form from the code behind page automatically without clicking the submit button and set the form action to an ASP page?

Our website is still mostly written in ASP and we need to move back and forth between ASP and Dot Net.

I''m sending a request variable from ASP to a dot net page, I set the session variable in Dot Net, and then want to send back the same request variable to another ASP page.

When I tried Server.Transfer, it only worked if I was transferring to another Dot Net page, but it gave an error when I tried to transfer to an ASP page.

thanks!
Ornitte

推荐答案

也许 [ ^ ]将为您提供帮助.
Maybe this[^] will help you.


这篇关于自动从C#代码中发布表单,无需单击提交按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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