?
Solved

layout page access

Posted on 2014-01-30
2
Medium Priority
?
276 Views
Last Modified: 2014-02-04
Hi,
 
In  the   _MasterLayout.cshtml  page I have the following along with other menu.

<div id="image">
 
<img class="logo" src="~/Content/images/Icons/logo.png" width="149" alt="img">

</div>

And I am using this layout page in  Home view

@{
        Layout = "~/Views/Shared/_MasterLayout.cshtml";
}

Now it is displaying the logo, which is fine.

Similarly I am using the same layout page for  Employees view

Here in this page I don’t want to show the logo , instead I want to say  “Employee Details”

So, could you please say me how to update layout page div tag from employees view.

and i am using mvc 4 razor
0
Comment
Question by:praveen1981
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 1500 total points
ID: 39822028
You'll have to do it with JavaScript. If you're using jQuery you can do something like:

$("#image")

to get a handle to the div and then change the HTML inside the div. I think there's an html() method in jQuery that would let you replace the contents of the div with whatever you want.

Having said that, if you don't want the same thing to appear on every page in the system it probably shouldn't be on the layout page.
0
 

Author Closing Comment

by:praveen1981
ID: 39832087
Many thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question