|
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
|
|
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!
|
|
Rank: Member Groups: Member
Joined: 12/29/2008 Posts: 29
|
Thanks a lot for your fast Response. That works fine!
Kind regards, Roger
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Great. Glad to hear that it's working for you!
|
|