The problem is that your CSS has something that formats this line based on the <a>
tag of HTML Link to CSS Nested
Example:
.Topo{}
.Topo a { aqui está o codigo que alinha e deixa branco}
So when you put it without <a href
it went without formatting. (it did not even get called the nested css)
3 suggestions:
1. Disable CSS for <A>
and change to custom
Ex:
.Topo a {}
You will replace with:
.MinhaClass{ mesmo código do de cima}
and you'll call it like this:
@Html.ActionLink(linkText: "Bem Vindo(a) " + User.Identity.GetUserName() + "!", actionName: "Index", controllerName: "RelatorioTagModels1", new with {.class = "MinhaClass" })
* NOTE: For you to find which class you use the 'inspect' of your browser, it will show which css it is.
2. Leave with <a>
but disable the click
Create the following css:
.disabled {
pointer-events: none;
cursor: default;
}
You just need to call this disable:
@Html.ActionLink (linkText: "Welcome") + User.Identity.GetUserName () + "!", actionName: "Index", controllerName: "ReportTagModels1", new with {.class="disabled "})
3. Create a style that corrects the label
something like:
.LabelNome{
position: relative;
top: 20px;
color: white;
}
and then you call that LabelNome equal to the above examples
new with {.class = "LabelNome"
NOTE: It may be necessary to change the value 20px