Custom WebControls and images

M

Mantorok

Hi all

I have a custom web-control, when validation fails I want an image to appear
beside the control.

My images are stored in the projects resources.resx file - can I get at this
and render them to the client?

Thanks
Kev
 
G

Guest

In a round-about way, yes.
You can't stream the image to the client through your web control.
Remember...the purpose of a WebControl is rendering HTML.
You couldm however, have your WebControl render html that looks something
like:
<img src="resimage.aspx?resId=ErrorImage">

Then create an ASPX called resimage.aspx that gets teh data from the
resource file.
 

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,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top