Resource Files, Images, And The ImageUrl Property

Discussion in 'ASP .Net Building Controls' started by Nathan Sokalski, Sep 14, 2008.

  1. I have a resource file (*.resx) with several images in it. I am having
    trouble finding a way to use these images for controls such as Image,
    ImageButton, and other controls that an image can be assigned to. I have no
    trouble using String resources, but since the ImageUrl property expects a
    String, not an image, I am having trouple here. The only solution I can come
    up with is to create an extra Page that takes a querystring and returns an
    image, and then use that as the value for the ImageUrl, but it doesn't seem
    like that should be necessary. Is there a way to get a string that can be
    assigned to the ImageUrl property, or some way to access the images without
    saving them as individual files? Thanks.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
    Nathan Sokalski, Sep 14, 2008
    #1
    1. Advertising

  2. Nathan Sokalski

    Munna Guest

    Munna, Sep 14, 2008
    #2
    1. Advertising

  3. No, that does not help. I am looking for a way to use the image stored in
    the *.resx file. I do not want to need to upload the original *.gif or
    *.jpeg file, that is why I am putting the image in the *.resx file. The page
    you mentioned suggests using a String in the *.resx file, which works if you
    upload the original image, but if you are going to do that, you may as well
    not even use a *.resx file.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "Munna" <> wrote in message
    news:...
    > Hi
    >
    > check out this thread..
    > might help you
    > http://forums.asp.net/p/1299694/2534052.aspx
    >
    > Regards
    >
    > -------
    > Munna
    >
    > www.munna.shatkotha.com/blog
    > www.munna.shatkotha.com
    > www.shatkotha.com
    Nathan Sokalski, Sep 14, 2008
    #3
  4. Hi Nathan,

    As far as I know there's no way to do this. As we know, the ASP.NET Image
    control will render <img> to the client side. When the browser sees this
    HTML tag it'll try to download the image from the URL specified in the src
    attribute of the <img> tag. There's no way for ASP.NET to render images
    directly to the client side along with other HTML tags in one
    request-response.

    Regards,
    Allen Chen
    Microsoft Online Support

    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    | From: "Nathan Sokalski" <>
    | References: <>
    <>
    | Subject: Re: Resource Files, Images, And The ImageUrl Property
    | Date: Sun, 14 Sep 2008 16:15:23 -0400
    | Lines: 29
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
    | X-RFC2646: Format=Flowed; Original
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
    | Message-ID: <#>
    | Newsgroups:
    microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.aspnet,m
    icrosoft.public.dotnet.framework.aspnet.buildingcontrols,microsoft.public.do
    tnet.languages.csharp,microsoft.public.dotnet.languages.vb
    | NNTP-Posting-Host: pool-72-81-61-33.phlapa.east.verizon.net 72.81.61.33
    | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP04.phx.gbl
    | Xref: TK2MSFTNGHUB02.phx.gbl
    microsoft.public.dotnet.framework.aspnet:75986
    microsoft.public.dotnet.framework.aspnet.buildingcontrols:1115
    microsoft.public.dotnet.languages.csharp:104698
    microsoft.public.dotnet.languages.vb:50978
    microsoft.public.dotnet.framework:16162
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    |
    | No, that does not help. I am looking for a way to use the image stored in
    | the *.resx file. I do not want to need to upload the original *.gif or
    | *.jpeg file, that is why I am putting the image in the *.resx file. The
    page
    | you mentioned suggests using a String in the *.resx file, which works if
    you
    | upload the original image, but if you are going to do that, you may as
    well
    | not even use a *.resx file.
    | --
    | Nathan Sokalski
    |
    | http://www.nathansokalski.com/
    |
    | "Munna" <> wrote in message
    | news:...
    | > Hi
    | >
    | > check out this thread..
    | > might help you
    | > http://forums.asp.net/p/1299694/2534052.aspx
    | >
    | > Regards
    | >
    | > -------
    | > Munna
    | >
    | > www.munna.shatkotha.com/blog
    | > www.munna.shatkotha.com
    | > www.shatkotha.com
    |
    |
    |
    Allen Chen [MSFT], Sep 16, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    5,946
    aa7im
    Dec 9, 2004
  2. bruticus
    Replies:
    0
    Views:
    433
    bruticus
    Oct 5, 2007
  3. Aidy
    Replies:
    0
    Views:
    371
  4. Adam Right

    absolute path to ImageUrl property .....

    Adam Right, Jan 28, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    597
    Patrice
    Jan 28, 2008
  5. Nathan Sokalski
    Replies:
    2
    Views:
    513
    Nathan Sokalski
    Sep 14, 2008
Loading...

Share This Page