Home > Net >  MVC - introduction, MVC_ database literature categories: technical literature in August 2020
MVC - introduction, MVC_ database literature categories: technical literature in August 2020

Time:11-08

Introduction of the MVC -
Document types: August 2020 project technical literature
Development tools and key technology: Microsoft visual studio and MVC
Author: Sirius; Grade 2019, grade; Write the date: 2020.8.13
1. The extracurricular knowledge
ASP.NET is a development framework for using HTML, CSS, JavaScript, and server script to build web pages and web site,

ASP.NET support open three patterns: Web Pages, the MVC (Model View Controller) as well as the Web Forms;

2. MVC programming model
MVC is a framework for building web applications, using the model view controller design:
? Model: the core of the application
? View: the data suggest that
? The Control controller: processing input
Other facilities: MVC model at the same time provide for HTML, CSS and javascript complete control
Then we will work together to create a MVC
3. Create a MVC
First of all we need to have Microsoft visual studio, of course, what I use is cracked versions, if you had no resources can also use the visual studio express2010/2010
he is free1 st open our development tools,
2 nd new
3 rd project
4 th choose ASP.NET Web application
5 th _MVC (project name) FJDPXT_MVC storage path name change, click ok
6 th select empty and MVC core, click ok
Good then we will create a simple MVC project
4. To understand the application folder
Application information:
? The Properties
? Refer to
The application folder:
? The App_Data folder: used to store application data
? Content folder: for static to the as CSS stylesheet. Charts. Image
? Controllers folder: controller
? Models folder: model class
? Scripts folder: the class to which the script file
? Views folder: displays the HTML file (user interface)
The configuration file:
? The global.asax
? Packages. The config
? The web.config

Conclusion: all the folder's name in the MVC application is equal, the MVC framework based on the default name, controller used for controllers folder and view in the view folder, model in the models folder, all we don't have to use in your application folder name, standardized naming way to reduce the amount of code, at the same time, is advantageous to the understanding of MVC project developers

5.
The file type is ASP.NET
The file type extension
HTML, HTM or HTML
ASP, ASP
ASP.NET aspx
ASP.NET Razor. C # CSHTML
ASP.NET Razor VB. VBHTML

6. Run you create program
If you created the view page, you can choose to debug, start debugging from the debug menu
Start the shortcut: F5
Close the shortcut: shift + F5

7. Share an example:
The controller page:
Using PartOne. EntityClass;
Using System;
Using System. Collections. Generic;
Using System. Linq;
Using System. The Web;
Using System. Web. Mvc;
Using PartOne. Models;
Using PartOne.Com mon;
Using System. Text. RegularExpressions;
Using System. IO;
Using System. The Transactions;
Using System. The Data;

The namespace PartOne. Controllers
{
Public class MainController: Controller
{
//GET: the Main
///& lt; Summary>
///student information maintenance page
///& lt;/summary>
///& lt; Returns>
Public ActionResult Index ()
{
Return the View ();
}
View page:
@ {
Layout=null;
}




<meta charset="utf-8" & gt;
<meta HTTP - equiv="X - UA - Compatible" content="IE=9" & gt; @ * mode compatible * @
<meta name="viewport" content="width=device - width"/& gt;
Student information maintenance/practical test answers & lt;/title> <br/><The link href="https://bbs.csdn.net/topics/~/Plugins/bootstrap-4.1.3-dist/css/bootstrap.min.css" rel="stylesheet"/& gt; <br/><The link href="https://bbs.csdn.net/topics/~/Plugins/layui/css/layui.css" rel="stylesheet"/& gt; <br/><! - packaging style sheet - & gt; <br/><The link href="https://bbs.csdn.net/topics/~/Content/css/Student.css" rel="stylesheet"/& gt; <br/></head> <br/><body> <br/><! - page layout - & gt; <br/><Div & gt; <br/><H3 & gt; Student information maintenance/practical test answers & lt;/h3 & gt; <br/><Div & gt; <br/><The form action="/" method="post" id="formSlecet autocomplete"="off" & gt; <br/><! - reset the form - & gt; <br/><Input type="reset" hidden/& gt; <br/><Div & gt; <br/><The label for="studentNumber" & gt; Number: & lt;/label> <br/><Input type="text" id="studentNumber" placeholder="number, such as: xs201900001" & gt; <br/></div> <br/><Div & gt; <br/><The label for="studentName" & gt; Name: & lt;/label> <br/><Input type="text" id="studentName" placeholder="please enter the student's name & gt;" <br/></div> <br/><Div & gt; <br/><The label for="every" & gt; Class & lt; Sup & gt; * & lt;/sup> : & lt;/label> <br/><Select id="every" lay - verify="" lay - search & gt; <br/><The option value="https://bbs.csdn.net/topics/0" data - code="" & gt; - please select -- - & lt;/option> <br/></select> <br/></div> <br/><Div & gt; <br/><The label for="studentIDCard" & gt; Id number: & lt;/label> <br/><Input type="text" id="studentIDCard" placeholder="please enter the id number" & gt; <br/></div> <br/><br/><Div & gt; <br/><The button type="button" onclick="tabStudentSearch ()" & gt; Search & lt;/button> <br/><The button type="button" onclick="empty ()" & gt; Reset & lt;/button> <br/><The button type="button" onclick="openInsertModal ()" & gt; New & lt;/button> <br/><The button type="button" onclick="openImportModal ()" & gt; Import & lt;/button> <br/><The button type="button" onclick="exportExcel ()" & gt; Export Excel</button> <br/></div> <br/><br/><Div & gt; <br/><The table id="tabStudent" layui - filter="tabStudent & gt;" </table> <br/></div> <br/></form> <br/></div> <br/></div> <br/><script SRC="https://bbs.csdn.net/topics/~/Plugins/jquery-3.2.1.min.js" & gt; </script> <br/><script SRC="https://bbs.csdn.net/topics/~/Plugins/bootstrap-4.1.3-dist/js/bootstrap.min.js" & gt; </script> <br/><script SRC="https://bbs.csdn.net/topics/~/Plugins/layui/layui.all.js" & gt; </script> <br/><br/><br/><br/>This article represent only personal point of view, we do not guarantee the correctness of the content, the copyright, all rights reserved - Sirius <br/><br/><br/><br/>MVC_ database <br/><br/>Document types: August 2020 project technical literature <br/>Development tools and key technology: Microsoft visual studio and MVC <br/>nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/net/78918.html" target="_blank" style="color:#999">https//www.codepudding.com/net/78918.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/net/78917.html'>C # windowAPI to read and write files is unusual, GetLastWin32Error results back to 87</a></div> <div class="detail-arr-right">Next:<a href='/net/78919.html'>How about to peak, through the automatic identification of code back to the peak? I will give the se</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=ASP.NET' target='_blank'>ASP.NET</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>