Solved

MVC 2 master page data

Posted on 2015-02-02
1
112 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
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 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