提交时通过HTTP发送表单值 [英] Sending form value over HTTP when submitted

查看:64
本文介绍了提交时通过HTTP发送表单值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想像在ASP.NET的旧ASP中使用post方法那样,通过HTTP发送提交的表单值.
这是我要使用的网关给我的规范.
我在ASP.NET中使用VB

I would like to send the submitted form values over the HTTP as done with post method in old ASP in the ASP.NET.
This is a specification given to me by the gateway that I am trying to use.
I am using VB in ASP.NET

Kindly help me out.

推荐答案

您的问题不是很精确,因为从浏览器发送到服务器的所有内容通常都是通过HTTP传输的.如果表单操作URL是可实现的,并且该页面是通过HTTP请求的,则它是HTTP.如果它是完全限定的URL并以http://开头,则它也是HTTP.即使对服务器的请求是通过AJAX完成的,也是如此.至于使用POST进行HTTP传输的方法,也可以控制.
对于表单,请使用表单属性method ="POST";对于AJAX,则取决于您使用的JavaScript框架,但是也可以选择将传输方法设置为POST.

还是很困惑?发表评论!

干杯!
Your question is not very precise as everything sent from the browser to the server is usally transmitted via HTTP. If the forms action URL is realative and the page was requested via HTTP then it''s HTTP. If it''s a fully qualified URL and starts with http:// then it''s again HTTP. Even if the requests against the server are done via AJAX the same is true. As for using method POST for HTTP transfer that too can be controlled.
For forms use the form attribute method="POST" and for AJAX it depends on which javascript framework you are using, but there will also be an option to set the transfer method to POST.

Still confused? Leave a comment!

Cheers!


好吧,有些事情你脑子里还不清楚. asp和asp.net是服务器端脚本/编码,用于生成动态页面.它们支持HTTP,因为它们打算用于Web开发.

HTTP是一个碰巧具有Form POSTing的协议. Web开发需要的任何技术都需要支持(否则它将变得毫无用处).因此,asp和asp.net都支持Form POSTing.您可以使用asp.net和其他功能在asp中做任何事情.当然syntex和symantec可能并不完全相同.

因此,请放心,您可以使用asp.net来完成asp中的任何操作.
Well there are few things which are not clear in your head. asp and asp.net are server side scripting/coding to generate dynamic pages. They support HTTP as they are meant to be used for web development.

HTTP is a protocol which happen to have Form POSTing. Any technology that needs does web development needs to support (other wise it becomes useless). As such both asp and asp.net do support Form POSTing. What ever you can do in asp you can do with asp.net and more. Of course the syntex and symantec may not exactly the same.

So, rest assured that you can do whatever you have in asp using asp.net.


先生,我想您的意思是您想使用html控件并使用Request变量和它们的名称作为键.
那么您需要使用以下代码:

字符串形式的Dim值= Me.Request.Form("ElementName")
Sir, I think you mean that you want to use html controls and fetch their values using Request variable and their names as keys.
then you need to use this code:

Dim value As String = Me.Request.Form("ElementName")


这篇关于提交时通过HTTP发送表单值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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