ASP检查请求的方法 [英] ASP check request method

查看:86
本文介绍了ASP检查请求的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检查我的表单中传统的ASP提交?

How do i check if my form has been submitted in classic ASP?

推荐答案

首先,你可以检查一下,如果 Request.ServerVariables(REQUEST_METHOD)=POST。也就是说,假设,您使用POST方法提交表单,初始加载将有GET方法,后续提交将POST。

First, you can check, if Request.ServerVariables("REQUEST_METHOD")= "POST". That is, assuming, you use POST method to submit the form, the initial load will have GET method, the subsequent submits will be POST.

您还可以在表单中添加一个隐藏字段,如果变量在POST数据集(的Request.Form 对象)时,你就会知道它是一个回传,否则它是第一负载

You can also add a hidden field in your form, if that variable is set in POST data (Request.Form object), you will know it is a postback, otherwise it is the first load.

这篇关于ASP检查请求的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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