Hi!
I have the following problem: in the asp.net mvc Upload widget, I cannot change the text of the Upload widget. In this thread there is a solution for this problem, however it does not work in ASP.NET MVC!
My code is fairly simple, there is
in the cshtml and the following code in the header:
If there would be an event for the widget (e.g. loaded) I could subscribe to it, but now, the only solution is to use the HTML and js way of creating an Upload widget, which is far from optimal in an ASP.NET MVC project.
Thanks for the help!
I have the following problem: in the asp.net mvc Upload widget, I cannot change the text of the Upload widget. In this thread there is a solution for this problem, however it does not work in ASP.NET MVC!
My code is fairly simple, there is
@(Html.Kendo().Upload()
.Name(
"FilesToUpload"
)
)
$(document).ready(
function
() {
$(
"#FilesToUpload"
).closest(
".k-upload"
).find(
"span"
).text(
"Select unit bulk upload file"
);
});
Thanks for the help!
I use ASP.NET MVC too, but dont use the wrappers.
If i understand you correctly, you want to change the text of the upload, that is by default "Select" ?
creating the object with jQuery you can do:
Thanks for the fast answer, but this doesn't quite solve the issue. Unfortunately there is no localization property which I can use to change the text of the Upload button. And I would like to stick to the fluent interface that is built upon the HtmlHelper class, because all of my code is done like that and I like uniformity in my code :)
However until I find a solution I will use the code u posted, thanks for that and if I find a solution I won't hesitate to share in this thread.
Cheers,
Márk