[RESOLVED] can I localize the browse text in a fileupload control

Hi all,

Can I localize the browse text in a fileupload control? (flip it between English and French)

Any ideas?

Thanks

Gord

Hi,

as far as i know you can't do that. This is set on browser level if i recall corectly and depends on clients "windows" (os) language.

There are workarrounds available on web ;)

Not directly, no. The file upload is probably the worst HTML element, allowing very little in the way of design and styling. Personally, I always use a third party component, so I get styling as well as async and progress.

You can have a button with text you want to have. Set the css style to overlap the fileupload control..

Thanks all

Tamilmani Kpr

You can have a button with text you want to have. Set the css style to overlap the fileupload control..

Hi Tamilmani Kpr

how would I hook the button control to the fileupload, so as to fire the fileupload control when the css styled button is clicked?

 

thanks

Gord

Hi GordMacDonald,

                  Try this...

<style type="text/css">

.fileUpload
{
    width:84px;
    filter:alpha(opacity=0);
    -moz-opacity:0;
    opacity:0;
    elevation:below;
    position:relative;
    left:-90px;
    top:-3px;
    vertical-align:middle;
    height:26px;
}

</style>

 <input id="Button1" type="button" style="left: 0px; position: relative; top: 1px;
                                width: 73px; font-family: Palatino Linotype" value="Import..."  />
                            <asp:FileUpload runat="server" ID="fileUpload" CssClass="fileUpload" size="1"  />

Tamilmani Kpr

Hi GordMacDonald,

                  Try this...

<style type="text/css">

.fileUpload
{
    width:84px;
    filter:alpha(opacity=0);
    -moz-opacity:0;
    opacity:0;
    elevation:below;
    position:relative;
    left:-90px;
    top:-3px;
    vertical-align:middle;
    height:26px;
}

</style>

 <input id="Button1" type="button" style="left: 0px; position: relative; top: 1px;
                                width: 73px; font-family: Palatino Linotype" value="Import..."  />
                            <asp:FileUpload runat="server" ID="fileUpload" CssClass="fileUpload" size="1"  />

 

Thanks - I will check this out!

You cant do it. Better to use Custom control or Ready to use control for these type of functionality.

its not possible but workaroung is that use a textbox and button and use fileupload control but keep it hidden on button click fire click event of file upload from javascript and on select set file text in textbox.

Firing the fileupload click event on a button click will not work in firefox browser....

thoughts on "[RESOLVED] can I localize the browse text in a fileupload control "

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>