Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

layout page access

Posted on 2014-01-30
2
Medium Priority
?
281 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

609 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