Solved

layout page access

Posted on 2014-01-30
2
267 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
2 Comments
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now