Anyone use AspImage.Image?

Can anyone tell me how to use the variables submitted from a form in the script for the AspImage.Image component?

Logically, you would think that simply using something like:

Image.BackgroundColor = request.form("back_color")

would do the trick, but it always produces this error:

Type mismatch: 'request.form(...).BackgroundColor'

Any ideas anyone?

LVL 1
mkill22Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

xabiCommented:
You must convert the values into integer or string.

In yous example it must be Integer  so use cint()

Image.BackgroundColor = cint(request.form("back_color"))

Xabi

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xabiCommented:
In autosize you must use Bool type parameters, so use Cbool()

Image.Autosize = Cbool(request.form("Autosize"))

In FontName it must be string, so use cstr()

Image.FontName = cstr(request.form("fontname"))

Hope it helps you

Xabi
0
mkill22Author Commented:
Can you help at bit more?

When I try:

Image.FontColor = cstr(request.form("fontcolor"))

I get type mismatch error.

The content of request.form("fontcolor") is vbRed. I don't seem to be able to use cstr() with color constants.

Any idea?
0
xabiCommented:
That's cause vbRed is a constant. I can't rememver it's value, but it's an integer. I'm at home right now, and don't have my books near me. I'll post you the correct value for vbRed.
xabi
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.