For some odd reason, Visual Studio 2013 keeps converting the following line of code:
<input type="button" value="@T("Checkout.ShipToThisAddress")" class="button-1 select-shipping-address-button" onclick=" setLocation('@Url.RouteUrl("CheckoutSelectShippingAddress", new {addressid = item.Id})') " />
To this:
<input type="button" value="@T("Checkout.ShipToThisAddress")" class="btn-default-1 pull-right" onclick=" setlocation('@url.routeurl("checkoutselectshippingaddress", new { addressid = item.id })') " />
Note that tag attribute names as well as content are lower case. Also, Visual Studio complains that the line is missing a double-quote only in the editor. Here's the generated output:
<input type="button" value="Bill to this address" class="btn-default-1 pull-right" onclick="setLocation(' /checkout/selectbillingaddress?addressid=10856 ') ">
I tried to use the following suggestions, but it applies only to ASP not MVC pages. I couldn't find an MVC option in the Text Editor options in VS 2013.
Format Document in Visual Studio 2010 asp tags format to lowercase
on*
attributes). If that's not practical, try storing your JS in a variable beforehand so it's simplyonclick="@myvar"
. – Brad Christie