Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VS2012 MVC 4 total page paint after reroute to new page

Posted on 2014-03-18
2
Medium Priority
?
506 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
[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
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 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

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Make the most of your online learning experience.
Simple Linear Regression
Six Sigma Control Plans
Suggested Courses

618 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