PDA

Click to See Complete Forum and Search --> : problem with asp


raj2000
Jun 20th, 2000, 09:39 PM
In asp, how to identify more than one occurrence of the same value e.g


The string has "page" and I want to know the number of occurrences of this and return the actual values which are in this position.


<% @Language = "VBScript" %>
<% Response.buffer = true %>

<%
Dim Msg
Dim Lat
Dim Lon
Dim Map


Msg = Maps & "," & Lon &"," & Lat


' Lat=Request.QueryString("Lat")
' Lon=Request.QueryString("Lon")
' Map=Request.QueryString("Map")

Map = "OS2000.Map"

userid="1"

Lat = "50.748867"
Lon = "-001.554733"



Dim finalm

Set finalm = Server.CreateObject("DLLCall.Geomanconv")

RetStr=finalm.GEOMANCODE(Lat,Lon,Map)


dim test1
dim ClientPageNum
dim buffer
dim target

test1 = RetStr

if len(test1) = 0 then
test1 = "supply,some,text"
end if

testcount = 1
target = ""
buffer = ""
PageNum= ""



for i = 1 to len(test1)
if mid(test1,i,1) = "," then
if left(buffer,14) = "Page=" then

target = mid(buffer,15,100)
end if

if testcount = 1 then
mapnum = buffer
buffer = ""
end if


testcount = testcount + 1
else
buffer = buffer + mid(test1,i,1)
end if
next

if testcount = 1 then
mapnum = buffer
end if






%>


<B>Target variable 1 :</B><%=pagenum%>
<br>

%>

<%="Res="&RetStr%>