Solved

VS2012 MVC 4 total page paint after reroute to new page

Posted on 2014-03-18
2
476 Views
Last Modified: 2014-03-19
I am very new to Asp.net MVC and still learning. I have been developing a portal type website to display database data. In development and testing on my local computer I was very enthusiastic about the fact that when re-routing to a new page (all pages use _layout as header section) that there was NOT a total page repaint. However, I have just recently published to live Website and have noticed that on each reroute to new page that it is re-painting everything including the _layout header section. Am I missing something? I thought that was one of the advantages to MVC. All of my redirections are either @html.actionlink or @url.action with appropriate "controller" and "action" calls. Again, everything works awesome in test on development computer but when live on website, I get total page re-paints. Any insight appreciated!
0
Comment
Question by:Cubbybulin
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39939652
MVC has nothing to do with whether or not your page partially or completely posts (the term "paint" isn't really used in web development...well, maybe if your talking about the Canvas object it would be). MVC is an architectural style defining how your application connects is display layer to its service layer to its data layer. What your talking about is basically encapsulated in the "V" of "MVC", but nothing about MVC commands that what you are talking about should happen.

You have to remember that when you are developing locally, there is no latency (or it is very minimal)--you are making requests on the same machine that will respond to those requests. Everything is going to be faster when you work locally. Once you deploy, you now introduce the network as a bottleneck.

Partial posts are typically accomplished through AJAX. If you want to go that route, then I would offer the following tutorials as starting points:

http://www.w3schools.com/ajax/default.ASP
http://www.w3schools.com/ajax/ajax_intro.asp
https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started

You might consider working with JQuery, a Javascript framework that simplifies many mundane Javascript tasks, including AJAX calls:

http://learn.jquery.com/about-jquery/how-jquery-works/
http://www.w3schools.com/jquery/jquery_intro.asp
0
 

Author Closing Comment

by:Cubbybulin
ID: 39939781
Got it. Very good explanation. I appreciate the insight and the links to the other resources.
Thanks!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bootstrap footer centering and columns alignement 3 59
Difference between List and Array in Python 5 67
Help with query 3 26
CSS: Making Pure CSS read more boxes thinner 5 31
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
The viewer will learn how to count occurrences of each item in an array.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

809 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