In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
How to use MVC4 to make a website, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
I heard that Win8 and v2012 were released, and today I reinstalled the system on a whim.
It feels like a good interface.
Install vs2012 to learn mvc4, unexpectedly did not find the Vs2012 professional version of the crack, simply download Express for Web, can be considered to support the genuine bar!
509m will soon be downloaded and then installed.
After installing the interface, it still feels a lot different from vs2010.
A brother said that the best way to learn is to complete a small thing independently. We are going to learn to make a small website. If you think of a good name, let's call it NineskyCMS. Anyway, the name CMS is badly used. I also follow suit. I hope I can finish her.
The official beginning of learning:
Open VS Express for Web-> New Project
Next step
OK, wait a moment to create the project to complete.
Take a look at solution Explorer, which is still very different from the folder generated by mvc3.
Run it and see how it works.
The interface is nice.
The folder structure doesn't like to be modified:
Delete InitializeSimpleMembershipAttribute under Filters
Delete the Images folder
Delete AccountController.cs under Controllers
Delete WebApiConfig.cs under App_Start
Open the RouteConfig.cs file
Routes.MapRoute (name: "Default", url: "{controller} / {action} / {id}", defaults: new {controller = "Home", action = "Index", id = UrlParameter.Optional})
Change action = "Index" to action = "Default". Ha ha, personal habits, I prefer Default
1. Open HomeController and change public ActionResult Index () to public ActionResult Default (), and delete public ActionResult About () and public ActionResult Contact ().
Change the Content folder to Skins. The revised style is as follows:
Modify the BundleConfig.cs and modify it as follows:
Namespace CMS {public class BundleConfig {/ / for more information about Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725public static void RegisterBundles (BundleCollection bundles) {bundles.Add ("~ / bundles/jquery"). Include ("~ / Scripts/jquery- {version} .js"); bundles.Add (new ScriptBundle ("~ / bundles/jqueryui"). Include ("~ / Scripts/jquery-ui- {version} .js") Bundles.Add (new ScriptBundle ("~ / bundles/jqueryval"). Include ("~ / Scripts/jquery.unobtrusive*", "~ / Scripts/jquery.validate*"); / / use the development version of Modernizr for development and information. Then, when you are ready for production, use the build tool on http://modernizr.com to select only the required tests. Bundles.Add (new ScriptBundle ("~ / bundles/modernizr"). Include ("~ / Scripts/modernizr-*"); bundles.Add (new StyleBundle ("~ / Skins/css"). Include ("~ / Skins/Default/Style.css")) Bundles.Add (new StyleBundle ("~ / Skins/jquery-ui/css"). Include ("~ / Skins/jquery-ui/jquery.ui.core.css", "~ / Skins/jquery-ui/jquery.ui.resizable.css", "~ / Skins/jquery-ui/jquery.ui.selectable.css", "~ / Skins/jquery-ui/jquery.ui.accordion.css", "~ / Skins/jquery-ui/jquery.ui.autocomplete.css", "~ / Skins/jquery-ui/jquery.ui.button.css" "~ / Skins/jquery-ui/jquery.ui.dialog.css", "~ / Skins/jquery-ui/jquery.ui.slider.css", "~ / Skins/jquery-ui/jquery.ui.tabs.css", "~ / Skins/jquery-ui/jquery.ui.datepicker.css", "~ / Skins/jquery-ui/jquery.ui.progressbar.css", "~ / Skins/jquery-ui/jquery.ui.theme.css") }}
1. Delete Vies/Account, delete Vies//Home/About.cshtml, rename Index.cshtml to Default.cshtml, delete Shared/ _ LoginPartial.cshtml.cshtml, delete Views/_ViewStart.cshtml
2. Open web.config and modify the database connection to
OK! When the work is done, the world is finally quiet!
The final interface is as follows:
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.