خرید بک لینک

Vote count: 0

I have a pretty big asp.net-mvc site with 100 controllers and thousands of actions. Previously the header image that was defined on the Site.Master page was hardcoded and I want to make it dynamic.

To Do so, i added this line to my Site.Master file:

  <%= Html.Action("GetHeaderTitle", "Home")%>

which just retus some HTML for the header title.

The issue is that also had this same hard coded value. I could obviously create another HTML.Action to have it show the dynamic valid in the title but now I am going back to the server twice for essentially the same information (not the exact same HTML but the same logic on the server to get the data).

Is there anyway to have an Html.Action retu multiple snippets of html that I can updates in different places on my master page.

asked 1 min ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: شنبه 15 اسفند 1394 ساعت: 19:22

صفحه بندی