Solved

VS2012 MVC 4 total page paint after reroute to new page

Posted on 2014-03-18
2
467 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 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
Comment Utility
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
Comment Utility
Got it. Very good explanation. I appreciate the insight and the links to the other resources.
Thanks!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Read about why website design really matters in today's demanding market.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to count occurrences of each item in an array.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now