Reputation: 179
@Html.ActionLink(
linkText: "Quote Number: "@item.QuoteNumber,
actionName: "MyAction",
controllerName: "Home",
)
I'm trying to do something as above to append the item quote number the literal label. QuoteNumber
is a string.
Upvotes: 1
Views: 1139
Reputation: 9881
You are in C#, so you can just append the strings. Something like:
@Html.ActionLink(
linkText: "Quote Number: " + item.QuoteNumber,
actionName: "MyAction",
controllerName: "Home"
)
Upvotes: 3
Reputation: 6784
you can use the following
@Html.ActionLink( linkText: string.Format("Quote Number: {0}",item.QuoteNumber), actionName: "MyAction", controllerName: "Home")
and if you want to pass values
@Html.ActionLink(string.Format("Quote Number: {0}",item.QuoteNumber), "MyAction","Home", new {id = item.QuoteNumber})
Hope this will help you
Upvotes: 2