Solved

VS2012 MVC 4 total page paint after reroute to new page

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Modify a small python script 19 97
egit plugin on eclipse 8 41
Full Screen problem when auto scale IFRAME 2 65
Auto-indent certain lines in Notepad++ 10 35
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

23 Experts available now in Live!

Get 1:1 Help Now