---
title: "How to display text in an MVC view with htmlattrbutes"  
description: "How to display text in an MVC view with htmlattrbutes"  
author: "Takeshi Okada"  
published: 2014-11-28  
updated: 2014-11-29  
canonical: https://www.mindstick.com/forum/12715/how-to-display-text-in-an-mvc-view-with-htmlattrbutes  
category: "asp.net"  
tags: ["asp.net mvc", "view"]  
reading_time: 1 minute  

---

# How to display text in an MVC view with htmlattrbutes

I have the following [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) :

```
@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Manage", "Account", routeValues: null, htmlAttributes: new { title = "Manage" })
```

I just want to display the [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) (with the correct htmlattribute) (i.e. no [link](https://www.mindstick.com/articles/23633/link-builder))

Could you help me with the correct syntax please?

## Replies

### Reply by Anonymous User

If i understand correctly,you want to show the text inside your link without an achor tag, but with your html attributes (title attributes)

**Try this**

```
<span title="Manage">Hello @User.Identity.GetUserName() !</span>
```


---

Original Source: https://www.mindstick.com/forum/12715/how-to-display-text-in-an-mvc-view-with-htmlattrbutes

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
