Solved

MVC 2 master page data

Posted on 2015-02-02
1
118 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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
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…

724 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