Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MVC 2 master page data

Posted on 2015-02-02
1
Medium Priority
?
121 Views
Last Modified: 2015-02-03
I need to read a query string value and if it exists, change a phone number on the master page of an mvc 2 website. I'm not sure how to do this and stay within the MVC model? I've found this solution but I'm still struggling to apply this to what I need to do: http://www.asp.net/mvc/overview/older-versions-1/views/passing-data-to-view-master-pages-cs
0
Comment
Question by:robanddeanna
[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
1 Comment
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 2000 total points
ID: 40585876
Which part are you having trouble with?  The article you pointed to is essentially saying to use the ViewData dictionary object to provide data for the master page.

The ViewData dictionary is essentially a dumping ground for bits of data and is available across views, so can be used to feed your master page.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

721 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