Custom WebControls and images

Discussion in 'ASP .Net' started by Mantorok, Aug 10, 2006.

  1. Mantorok

    Mantorok Guest

    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?

    Mantorok, Aug 10, 2006
    1. Advertisements

  2. Mantorok

    Guest 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
    <img src="resimage.aspx?resId=ErrorImage">

    Then create an ASPX called resimage.aspx that gets teh data from the
    resource file.
    Guest, Aug 10, 2006
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.