Link to home
Start Free TrialLog in
Avatar of mkill22
mkill22

asked on

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?

ASKER CERTIFIED SOLUTION
Avatar of xabi
xabi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xabi
xabi

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
Avatar of mkill22

ASKER

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?
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