Split string (then) Convert string into Integer

N

news

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
 
D

Dan

news said:
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.
 
N

news

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,794
Messages
2,569,641
Members
45,355
Latest member
SJLChristi

Latest Threads

Top