Last post Mar 18, 2010 08:56 AM by Tapan Bhatt
Mar 18, 2010 07:32 AM|nehakapoor|LINK
I have doubt regarding localization. I need to show different images for image button based on different Culture.
I have created resource file under app_globalresources for english and french. It is working for labels. based on selected culture, i can change text mark up. I need to load images for the image button from resx based on the culture. Any help appreciated.
<asp:Label ID="lblWelcome" runat="server"
Text="<%$ Resources:Resource, lblWelcome %>"></asp:Label> for label it is working
<asp:ImageButton ID="ImageButton1" ImageUrl=" "
How to add images from resouce file. Please help
asp.net 2.0 C#
Mar 18, 2010 08:08 AM|ojgcom|LINK
As far as i concern, the resource file is only for language text switching, i would recommend you using a database to store the images path based on resource file something like this
<asp:ImageButton ID="ImageButton1" ImageUrl=" /generatemyimage?url=<%$ Resources:Resource, myimage %>"
Or if above idea does not work, you may create the button in dynamic mode, so it is created in page_load creation
Mar 18, 2010 08:56 AM|Tapan Bhatt|LINK
Please go through my below post:
I hope it will helpful to you.