Solved

layout page access

Posted on 2014-01-30
2
273 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 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

691 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