Client localization

I have a colleague who thinks this

alert('<asp:Localize ID="ErrorAddingComponent" runat="server" Text="There was an error adding component: "  meta:resourcekey="ErrorAddingComponent"/>' + errortext);

      

- it's a good idea if we get an error from the AJAX call, errortext is a parameter of the function called on error from jquery ajax,

for me the thought of using server side localization control seems horrible, we are using asp.net MVC, so it is preferable for me to use GetLocalResourceObject,

Can anyone give me any reasons I can raise with him? (or if you think his solution is okay, why?).

As an aside, the warning annoys me too, I believe that we should parse errors in the div for presentation.

0


a source to share


1 answer


alert = -1

div is nice and not annoying, plus you can suggest multiple solutions, links like, try again or ignore or start over.



If you use an alert it looks ugly and you only provide limited options to the user.

+3


a source







All Articles