Leap Bun
Leap Bun

Reputation: 2295

How to use nested inline asp.net tags?

I would like to display a link with Html.ActionLink.

<%= Html.ActionLink("HOME", "Index") %>

Instead of using the word "HOME", I would like to use string from resource file because I need multiple languages.

<%$ Resources:Site, MenuHome %>

In this case, how to nested these tags? Thanks!

Upvotes: 0

Views: 243

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038830

<%= Html.ActionLink(Resources.Site, "Index") %>

which assumes that you have a Resources.resx file in the App_GlobalResources special folder and a Site key inside it.

Upvotes: 1

Related Questions