查询字符串测试 [英] Query string testing

查看:55
本文介绍了查询字符串测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在一个网站上工作,提供来自

几个组的图像显示和导航,并将以下代码更改为显示的gif

基于传入的查询字符串:

调用:< a href =" ShowImage.asp?group = 01& image = 01& max = 28"> ; Grou p 01,图片04,

最多28< / a>


<%


grp = request.QueryString(" group")

img = request.QueryString(" image")

max = request.QueryString(" max" ;)

%>


< html>

< head>

< ; title> ShowImage< / title>

< / head>

< body MS_POSITIONING =" GridLayout">


< form id =" Form1"方法= QUOT;交" runat =" server">

< img src =" images /<%= grp%><%= img%> .bmp">


< / form>


< / body>

< / html>

我的计划是使用集合中的图像加载页面,并允许

用户使用Next在集合中的图像之间导航和

按钮。


无论如何都要做以下的事情吗?


如果不是[image] = 01那么

''显示上一个按钮

elseif not [image] = [max]然后

''显示下一个按钮

end if


此外,是否可以根据图像值为下一个和之前的

链接添加或减去1?

{NEXT LINK}
http:// whatever / ShowImage。 aspx?group = [group]& imgId = [image] + 1& max = [max]

{PREVI OUS LINK}
http://whatever/ShowImage.aspx?group = [group]& imgId = [image] -1& max = [max]


问候,Carl Gilbert

Hi

I am working on a site to provide displaying and navigation of images from
several groups and have the following code that changes to displayed gif
based on the query string passed in:
Call: <a href="ShowImage.asp?group=01&image=01&max=28">Grou p 01, Image 04,
Max 28</a>

<%

grp = request.QueryString("group")
img = request.QueryString("image")

max = request.QueryString("max")
%>

<html>
<head>
<title>ShowImage</title>
</head>
<body MS_POSITIONING="GridLayout">

<form id="Form1" method="post" runat="server">
<img src="images/<%=grp%><%=img%>.bmp">

</form>

</body>
</html>

My plan is to load the page with an image from a collection and allow the
user to navigate between the images in the collection using Next and
Previous buttons.

Is there anyway to do something like the following?

if not [image] = 01 then
''show the previous button
elseif not [image] = [max] then
''show the next button
end if

Also, is it possible to add or subtract 1 for the next and the previous
links based on the image value?

{NEXT LINK}
http://whatever/ShowImage.aspx?group=[group]&imgId=[image]+1&max=[max]
{PREVIOUS LINK}
http://whatever/ShowImage.aspx?group=[group]&imgId=[image]-1&max=[max]

Regards, Carl Gilbert

推荐答案

你想如何开始?用户可以选择该组和第一张

记录吗?还是只有小组?你如何计算最大参数。或者

分组图片在一个文件夹中或所有组中的所有图片在

一个文件夹中?如何命名图片?


Maarten。
How do you want to start? Can the user choose the group and the first
record? Or only the group? And how do you calculate the max parameter. Or
the pictures by group in one folder or all the pictures of all the groups in
one folder? How are the pictures named ?

Maarten.


{NEXT LINK}
http://whatever/ShowImage.aspx?group = [group]& imgId =<%CLng( request.querystrin

g(" image")+1)%>

{PREVIOUS LINK}
http://whatever/ShowImage.aspx?group = [group]& imgId =<%CLng(request.querystrin

g(" image")-1)%>

显然,上面假设图像保存在图像中。 querystring。

你还需要用

<%request.querystring(" group")%>替换[group]。 (假设您的查询字符串被称为

" group")


-


问候


Steven Burn

Ur IT Mate Group
www.it-mate.co.uk


保持免费!

" Carl Gilbert" < cn*@newsgroup.nospam>在消息中写道

新闻:#o ************** @ tk2msftngp13.phx.gbl ...
{NEXT LINK}
http://whatever/ShowImage.aspx?group=[group]&imgId=<%CLng(request.querystrin
g("image") +1)%>
{PREVIOUS LINK}
http://whatever/ShowImage.aspx?group=[group]&imgId=<%CLng(request.querystrin
g("image") -1)%>

Obviously, the above assumes the image is held in the "image" querystring.
You''d additionally need to replace [group] with
<%request.querystring("group")%> (assuming your querystring is called
"group")

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Carl Gilbert" <cn*@newsgroup.nospam> wrote in message
news:#o**************@tk2msftngp13.phx.gbl...

我正在一个网站上提供来自几个组的图像的显示和导航,并根据传入的查询字符串将以下代码更改为显示的gif:

致电:< a href =" ShowImage.asp?group = 01& image = 01& max = 28"> Grou p 01,Image 04,
Max 28< / a>

<%

grp = request.QueryString(" group")
img = request.QueryString(" image")

/> max = request.QueryString(" max")
%>

< html>
< head>
< title> ShowImage< / title>
< / head>
< body MS_POSITIONING =" GridLayout">

< form id =" Form1"方法= QUOT;交" runat =" server">
< img src =" images /<%= grp%><%= img%> .bmp">

< / form>

< / body>
< / html>

我的计划是加载包含集合中图像的页面并允许
用户使用Next和
Previous按钮在集合中的图像之间导航。

无论如何都要执行以下操作?

如果不是[图片] = 01然后
''显示上一个按钮
如果不是[图片] = [最大]那么
''显示下一个按钮
结束如果

此外,是否可以根据图像值为下一个和之前的链接添加或减去1?

{NEXT LINK}
< a rel =nofollowhref =http://whatever/ShowImage.aspx?group =target =_ blank> http://whatever/ShowImage.aspx?group = [group]& imgId = [image] + 1& max = [max]
{PREVIOUS LINK}
http://whatever/ShowImage.aspx?group = [group]& imgId = [image] -1& max = [max]
<此致,Carl Gilbert
Hi

I am working on a site to provide displaying and navigation of images from
several groups and have the following code that changes to displayed gif
based on the query string passed in:
Call: <a href="ShowImage.asp?group=01&image=01&max=28">Grou p 01, Image 04,
Max 28</a>

<%

grp = request.QueryString("group")
img = request.QueryString("image")

max = request.QueryString("max")
%>

<html>
<head>
<title>ShowImage</title>
</head>
<body MS_POSITIONING="GridLayout">

<form id="Form1" method="post" runat="server">
<img src="images/<%=grp%><%=img%>.bmp">

</form>

</body>
</html>

My plan is to load the page with an image from a collection and allow the
user to navigate between the images in the collection using Next and
Previous buttons.

Is there anyway to do something like the following?

if not [image] = 01 then
''show the previous button
elseif not [image] = [max] then
''show the next button
end if

Also, is it possible to add or subtract 1 for the next and the previous
links based on the image value?

{NEXT LINK}
http://whatever/ShowImage.aspx?group=[group]&imgId=[image]+1&max=[max]
{PREVIOUS LINK}
http://whatever/ShowImage.aspx?group=[group]&imgId=[image]-1&max=[max]

Regards, Carl Gilbert



这看起来很干劲。不幸的是我收到了以下错误:


"变量使用vbscript 中不支持的自动化类型:''CLng''"



" Steven Burn" < pv*@noyb.com>在消息中写道

news:ea **************** @ TK2MSFTNGP15.phx.gbl ...
This looks good cheers. Unfortunately I got back the following error:

"Variable uses an Automation type not supported in vbscript: ''CLng''"


"Steven Burn" <pv*@noyb.com> wrote in message
news:ea****************@TK2MSFTNGP15.phx.gbl...
{NEXT LINK }
http://whatever/ShowImage.aspx?group = [group]& imgId =<%CLng(request.querystrin
g(" image")+1)%>
{PREVIOUS LINK}
http://whatever/ShowImage.aspx?group = [group]& imgId =<%CLng (request.querystrin
g(image)-1)%>

显然,上面假设图像保存在图像中。 querystring。
你还需要用
<%request.querystring(" group")%>替换[group]。 (假设你的查询字符串被称为
group)

-

问候

史蒂文伯恩
Ur I.T. Mate Group
www.it-mate.co.uk

保持免费!

" Carl Gilbert" < cn*@newsgroup.nospam>在消息中写道
新闻:#o ************** @ tk2msftngp13.phx.gbl ...
{NEXT LINK}
http://whatever/ShowImage.aspx?group=[group]&imgId=<%CLng(request.querystrin
g("image") +1)%>
{PREVIOUS LINK}
http://whatever/ShowImage.aspx?group=[group]&imgId=<%CLng(request.querystrin
g("image") -1)%>

Obviously, the above assumes the image is held in the "image" querystring.
You''d additionally need to replace [group] with
<%request.querystring("group")%> (assuming your querystring is called
"group")

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Carl Gilbert" <cn*@newsgroup.nospam> wrote in message
news:#o**************@tk2msftngp13.phx.gbl...

我正在一个网站上提供来自
几个组的图像的显示和导航,并根据传入的查询字符串将以下代码更改为显示的gif:

呼叫:< a href =" ShowImage.asp?group = 01& image = 01& max = 28"> Grou p 01,Image
04,
Max 28< / a>

<%

grp = request.QueryString(" group")
img = request.QueryString(" image")

max = request.QueryString(" max")
%>

< html>
< head>
< title> ShowImage< / title>
< / head>
< body MS_POSITIONING =" GridLayout">

< form id =" Form1"方法= QUOT;交" runat =" server">
< img src =" images /<%= grp%><%= img%> .bmp">

< / form>

< / body>
< / html>

我的计划是加载包含集合中图像的页面并允许
用户使用Next和
Previous按钮在集合中的图像之间导航。

无论如何都要执行以下操作?

如果不是[图片] = 01然后
''显示上一个按钮
如果不是[图片] = [最大]那么
''显示下一个按钮
结束如果

此外,是否可以根据图像值为下一个和之前的链接添加或减去1?

{NEXT LINK}
< a rel =nofollowhref =http://whatever/ShowImage.aspx?group =target =_ blank> http://whatever/ShowImage.aspx?group = [group]& imgId = [image] + 1& max = [max]
{PREVIOUS LINK}
http://whatever/ShowImage.aspx?group = [group]& imgId = [image] -1& max = [max]
<此致,Carl Gilbert
Hi

I am working on a site to provide displaying and navigation of images
from
several groups and have the following code that changes to displayed gif
based on the query string passed in:
Call: <a href="ShowImage.asp?group=01&image=01&max=28">Grou p 01, Image
04,
Max 28</a>

<%

grp = request.QueryString("group")
img = request.QueryString("image")

max = request.QueryString("max")
%>

<html>
<head>
<title>ShowImage</title>
</head>
<body MS_POSITIONING="GridLayout">

<form id="Form1" method="post" runat="server">
<img src="images/<%=grp%><%=img%>.bmp">

</form>

</body>
</html>

My plan is to load the page with an image from a collection and allow the
user to navigate between the images in the collection using Next and
Previous buttons.

Is there anyway to do something like the following?

if not [image] = 01 then
''show the previous button
elseif not [image] = [max] then
''show the next button
end if

Also, is it possible to add or subtract 1 for the next and the previous
links based on the image value?

{NEXT LINK}
http://whatever/ShowImage.aspx?group=[group]&imgId=[image]+1&max=[max]
{PREVIOUS LINK}
http://whatever/ShowImage.aspx?group=[group]&imgId=[image]-1&max=[max]

Regards, Carl Gilbert




这篇关于查询字符串测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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