Solved

How to test MVC applications, if can't view in browser.

Posted on 2012-04-12
6
280 Views
Last Modified: 2012-04-12
Dear Asp.net experts. I am learning MVC on my own in my spare time. I have past Asp.net experience and enjoy the old way of being able to test the look and feel of the website in my web browser. (I am a visual person).
In working with MVC, I am not able to do a "View in browser" or run my application on localhost, like I have with Asp.net in the past.

Is their something I don't know? If I can't test my website look and feel in localhost, on my machine, then that is very frustrating. Kind of like a bad April fools joke, not being able to visually look at your changes.

This could especially be a challenge if I need to test CSS changes to my website. Anyway, I would appreciate help from professional Asp.net developers. Thank you in advance.
0
Comment
Question by:brgdotnet
  • 3
  • 3
6 Comments
 
LVL 14

Accepted Solution

by:
binaryevo earned 150 total points
ID: 37837988
Oh but you can my friend... You can run the site in the debugger just like you can in web forms.  Exactly what kind of error are you getting or whats happening?
0
 
LVL 14

Expert Comment

by:binaryevo
ID: 37837994
0
 
LVL 2

Author Comment

by:brgdotnet
ID: 37838479
Hi BinaryVevo. I did not get an error. The page just did not display in the web browser. It looks like the other fellow pointed me to a nice post by Author Stephen Walther. If you have anything else to share with me please do so. Otherwise I will give the points away based on the Walther Article.
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 14

Expert Comment

by:binaryevo
ID: 37838545
You probably need to look for the correct route.  Look in your global.asax file ( FYI, the other fellow is still me... :=)  ), this will tell you your default routes.  Routing is how MVC "gets" to the page.  So for instance, in webforms, you would look for the location of a page like this:  ~/Forms/MyPage.aspx.  Well in MVC its different, the routing engine typically looks for views using the following default routing scheme:  controller/action/parameters.  Using the same example, for the same view ( MVC version of course ), /MyPage/Load.  See this link about routing below:

http://www.asp.net/mvc/tutorials/older-versions/controllers-and-routing/asp-net-mvc-routing-overview-cs
0
 
LVL 2

Author Closing Comment

by:brgdotnet
ID: 37838651
Thank you for your help.
0
 
LVL 2

Author Comment

by:brgdotnet
ID: 37838655
Thank you so much. I gave you the points. Have a great day.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

816 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

11 Experts available now in Live!

Get 1:1 Help Now