From: news on
Hello All;

I have a string from my database in the form of
768x1024 (This is an example, the numbers vary depending on the size of the
image)

What I am needing to do is the following.
I need to split the number from the X
768
1024

Then make them into Int
So I can use them like so:

<%if VarNum>768 then%>Image has been Resized<%end if%>

Any help on this would be greately appreciated.
Thank You

Wayne
www.picdrive.net


From: Dan on

"news" <me(a)nospam.com> wrote in message
news:a900c$4bfd057f$62100a64$25591(a)ALLTEL.NET...
> Hello All;
>
> I have a string from my database in the form of
> 768x1024 (This is an example, the numbers vary depending on the size of
> the image)
>
> What I am needing to do is the following.
> I need to split the number from the X
> 768
> 1024
>
> Then make them into Int
> So I can use them like so:
>
> <%if VarNum>768 then%>Image has been Resized<%end if%>
>
> Any help on this would be greately appreciated.
> Thank You
>
> Wayne
> www.picdrive.net
>
>

myString = "768x1024"

arValues = Split(myString,"x")


If CInt(arValues(0)) > 768 then ...



arValues(0) will contain 768, arValues(1) will contain 1024.


--
Dan


From: news on
Thank you Dan.

<%
getSize = 600
myString = "768x1024"
arValues = Split(myString,"x")
If CInt(arValues(0)) > getSize then
'arValues(0) will contain 768, arValues(1) will contain 1024.
response.Write"Image has been resized"
else
response.Write"View Image"
end if
%>

Works like a complete charm.
Thank you, thank you, thank you,

Wayne
www.picdrive.net