在ASP中知道这是第一次打电话。 [英] Know in ASP that it is the first time calling.
问题描述
你好,
我想知道,一个asp(用get方法调用自己,已经通过
任何参数给自己)。 />
ie:
在asp:test_asp.asp:
.....
< html>
< body>
< form action =" test_asp.asp" method =" get">
num:< input type =" text"名称= QUOT; my_num"大小= QUOT; 3英寸;> < br>
< input type =" submit" value =" Submit">
< / form>
<%
response.write(" this is my input) :&&;& Request.QueryString(" my_num"))
''...但我希望上面的内容也会写入输入,如果它是空的=""
''...而且我想查一下,是否是第一次运行asp
(没有queryString(计数= 0))
''....,我怎么能这样做?
%>
< / body>
< / html>
....
谢谢:)
Hello,
I want to know, wheter an asp (that call itself in "get" method, has passed
any parameter to itself).
i.e :
in the asp : test_asp.asp :
.....
<html>
<body>
<form action="test_asp.asp" method="get">
num : <input type="text" name="my_num" size="3"> <br>
<input type="submit" value="Submit">
</form>
<%
response.write("this is my input : " & Request.QueryString("my_num"))
'' ... but I want the above will write the input also if it is empty = ""
'' ... and also I want to check, whether it is the first time running the asp
(there is no queryString (count of it = 0))
'' .... , so How can I do that ?
%>
</body>
</html>
....
Thanks :)
推荐答案
w3schools.com
w3schools.com
" Eitan"在消息新闻中写道:ec ***************** @ TK2MSFTNGP09.phx.gbl ...
:你好,
:我想知道,一个asp(用get方法调用自己,已经通过了
:b $ b:任何自身的参数)。
:
:ie:
:在asp:test_asp.asp:
:....
:
:< html>
:< body>
:< form action =" test_asp.asp" ; method =" get">
:num:< input type =" text"名称= QUOT; my_num"大小= QUOT; 3英寸;> < br>
:< input type =" submit" value =" Submit">
:< / form>
:<%
:response.write(" this是我的输入:&&;& Request.QueryString(" my_num"))
:''...但是如果它是空的话我想要上面写的输入="" ;
:''...而且我想查一下,是否是第一次运行
asp
:(那里是没有queryString(它的数量= 0))
:''....所以我该怎么做?
:%>
:< / body>
:< / html>
该表格的名称怎么样?如何写出空输入?如果是第一次测试会话变量并对其进行测试,则可以测试
,
隐藏表单元素以及发布和测试等等。 />
-
Roland Hall
/ *这些信息的分发是希望它有用,但是
没有任何保证;甚至没有适销性的暗示保证
或特定用途的适用性。 * /
Technet脚本中心 - http:// www .microsoft.com / technet / scriptcenter /
WSH 5.6文档 - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
"Eitan" wrote in message news:ec*****************@TK2MSFTNGP09.phx.gbl...
: Hello,
: I want to know, wheter an asp (that call itself in "get" method, has
passed
: any parameter to itself).
:
: i.e :
: in the asp : test_asp.asp :
: ....
:
: <html>
: <body>
: <form action="test_asp.asp" method="get">
: num : <input type="text" name="my_num" size="3"> <br>
: <input type="submit" value="Submit">
: </form>
: <%
: response.write("this is my input : " & Request.QueryString("my_num"))
: '' ... but I want the above will write the input also if it is empty = ""
: '' ... and also I want to check, whether it is the first time running the
asp
: (there is no queryString (count of it = 0))
: '' .... , so How can I do that ?
: %>
: </body>
: </html>
How about name for that form? How can one write empty input? You can test
if it is the first time by setting a session variable and testing for it, a
hidden form element and posting and testing for that, etc.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Eitan写道:
Eitan wrote:
你好,
我想知道,一个asp(用get方法调用自己) ,有
将任何参数传递给自己。
ie:
在asp:test_asp.asp:
....
>< html>
< body>
< form action =" test_asp.asp" method =" get">
num:< input type =" text"名称= QUOT; my_num"大小= QUOT; 3英寸;> < br>
< input type =" submit" value =" Submit">
< / form>
<%
response.write(" this is my input:"& Request.QueryString(" my_num" ;))
''...但我希望如果它是空的,上面也会输入输入=
"" ''...而且我想检查,是否是第一次运行
的asp(没有queryString(它的数量= 0))
''....,所以我怎么能这样做?
%>
Hello,
I want to know, wheter an asp (that call itself in "get" method, has passed any parameter to itself).
i.e :
in the asp : test_asp.asp :
....
<html>
<body>
<form action="test_asp.asp" method="get">
num : <input type="text" name="my_num" size="3"> <br>
<input type="submit" value="Submit">
</form>
<%
response.write("this is my input : " & Request.QueryString("my_num"))
'' ... but I want the above will write the input also if it is empty = "" '' ... and also I want to check, whether it is the first time running the asp (there is no queryString (count of it = 0))
'' .... , so How can I do that ?
%>
在表单中放入一个隐藏字段。如果该字段具有一个值(无论你在表单中设置的值是什么价值),你知道表格已经发布了。
为什么首先使用GET,然而?
Put a hidden field in the form. If that field has a value (of whatever
value you set it to in the form), you know the form got posted.
Why use GET in the first place, however?
这篇关于在ASP中知道这是第一次打电话。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!