Welcome Guest Search | Active Topics | Sign In | Register

Localising Uploader does not work Options
Roger Jordan
Posted: Monday, March 24, 2014 4:13:51 AM
Rank: Member
Groups: Member

Joined: 12/29/2008
Posts: 29
Hello,

I'm using EO.Web.AJAXUploader. In PageLoad event I try to set the button text for UploadButtonText and CancelButtonText. Both are not working. Debugging Shows, that the texts are set in the variable, but they are not shown on Screen.

Example:

protected void Page_LoadPageLoad(...)
{
...
Uploader.UploadButtonText = "abc";
Uploader.CancelButtonText = "xyz";
...
}

Always the text set in LayoutTemplat is shown on Screen.

Can you please advice how to set the button text at runtime?

Thanks a lot,
Roger
eo_support
Posted: Monday, March 24, 2014 9:59:07 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

This is no directly support for that when LayoutTemplate is used. In the current build, as soon as you set LayoutTemplate, everything is taken from LayoutTemplate and properties such as UpdateButtonText are ignored. We will change our code to honor those properties in our next build. In the mean time, you can do something like this:

Code: C#
protected override void OnPreRender(EventArgs e)
{
    base.OnPreRender(e);

    //Get the upload button. Note here the type "Button"
    //must match the actual button type in your LayoutTemplate
    Button button = (Button)Uploader1.FindControl("UploadButton");

    //Change the button's text
    button.Text = localized_button_text;
}


Thanks!
Roger Jordan
Posted: Monday, March 24, 2014 10:09:32 AM
Rank: Member
Groups: Member

Joined: 12/29/2008
Posts: 29
Thanks a lot for your fast Response.
That works fine!


Kind regards,
Roger
eo_support
Posted: Monday, March 24, 2014 10:19:52 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Great. Glad to hear that it's working for you!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.