Custom WebControls and images

  • Thread starter Thread starter Mantorok
  • Start date Start date
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
 
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.
 
Back
Top