Reputation: 216303
I have a multilanguage site in ASP.NET MVC (no Core) where users are required to enter a license code and press a button to renew their subscription. The text for the button's title is cut after the first word even if the text loaded from the resources is composed of more than one word.
The message displayed in the button for the English version (but this happens also for the other languages supported) is stored in the resources.resx and its XML is the following
<data name="Recover_RenewCode" xml:space="preserve">
<value>Renew your license</value>
</data>
and the cshtml for the view is the following
<div class="form-group">
<div >
<input type="submit" [email protected]_RenewCode class="btn btn-primary btn-lg" />
</div>
</div>
but the button shows this output
The problem is even more weird because if I go to the source produced I can see this
<input type="submit" value="Renew" your license class="btn btn-primary btn-lg">
This seems to happen only in the Visual Studio 2019 debug/release environments using the IISExpress engine for rendering the site. When I put the application on its hosted staging site with IIS handling the app, the text is shown correctly. I can live with this problem but I would like to know if someone has ever seen this and if there is a possible place to look at in my code to find the problem.
For what it worth, the ASP.NET MVC version is the 5.2.3 and the bootstrap lib is 3.0.0. Of course it should be updated but for the moment I just need a quick fix to the site and I don't have the time (read "the customer won't pay") to do the upgrades.
Upvotes: 0
Views: 254
Reputation: 5977
Place quotes around the entire value attribute:
<input type="submit" value="@Resources.Recover_RenewCode" class="btn btn-primary btn-lg" />
Upvotes: 2