ASP.NET MVC - Part 1

Web Site Project Deployment The typical Web deployment scenarios for Web site projects include: Deploying a Web site by using the Copy Web Site tool, which can copy and synchronize files between the source computer, a destination computer or location. Deploying a Web site by using the Windows  XCopy command. Deploying a prebuilt (precompiled) Web site.

ppt90 trang | Chia sẻ: huongnt365 | Lượt xem: 695 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu ASP.NET MVC - Part 1, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
CSC 330 E-CommerceTeacher Ahmed Mumtaz Mustehsan GM-IT CIIT Islamabad Virtual Campus, CIIT COMSATS Institute of Information TechnologyT2-Lecture-14ASP.NET MVCPart - IFor Lecture Material/Slides Thanks to: www.w3schools.comObjectivesIntroductionMVC ApplicationMVC FoldersMVC LayoutMVC ControllersMVC ViewsMVC DatabaseMVC Models T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-3IntroductionIntroductionASP.NET is a development framework for building web pages and web sites with HTML, CSS, JavaScript and server scripting.ASP.NET supports three different development models:Web Pages MVC (Model View Controller)Web Forms.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-5The MVC Programming ModelMVC is one of three ASP.NET programming models. It is a framework for building web applications using a MVC (Model View Controller) design: The Model represents the application core (for instance a list of database records).The View displays the data (the database records).The Controller handles the input (to the database records). The MVC model also provides full control over HTML, CSS, and JavaScript.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-6The MVC Programming ModelThe MVC model defines web applications with three logic layers:The business layer (Model logic)The display layer (View logic) The input control (Controller logic)T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-7The MVC Programming ModelThe Model: is the part of the application that handles the logic for the application data. The model objects retrieve data (and store data) from a database.The View: is the parts of the application that handles the display of the data. Most often the views are created from the model data.The Controller: is the part of the application that handles user interaction. Typically controllers read data from a view folder, control user input, and send input data to the model.The MVC Model: separation helps you manage complex applications,One can focus on one aspect a time. For example, one can focus on the view without depending on the business logic. It also makes it easier to test an application.It simplifies group development. Different developers can work on the view, the controller logic, and the business logic in parallel.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-8Web Forms vs MVCThe MVC programming model is a lighter alternative to traditional ASP.NET (Web Forms). MVC is a lightweight, highly testable framework, integrated with all existing ASP.NET features, such as Master Pages, Security, and Authentication. T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-9Visual Studio Express 2012/2010Visual Studio Express is a free version of Microsoft Visual Studio.Visual Studio Express is a development tool tailor made for MVC (and Web Forms).Visual Studio Express contains: MVC and Web FormsDrag-and-drop web controls and web componentsA web server language (Razor using VB or C#)A web server (IIS Express)A database server (SQL Server Compact)A full web development framework (ASP.NET)T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-10Visual Studio Express 2012/2010If you want to install Visual Studio Express, click on one of these links:Visual Web Developer 2012 (If you have Windows 7 or Windows 8)Visual Web Developer 2010 (If you have Windows Vista or XP)After you have installed Visual Studio Express the first time, it pays to run the installation one more time, to install fixes and service packs. Just click on the link once more.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-11Internet ApplicationInternet ApplicationTo learn ASP.NET MVC, we will Build an Internet ApplicationWe will build an Internet application that supports adding, editing, deleting, and listing of information stored in a database.Part I: Creating the ApplicationPart II: Exploring the Application FoldersPart III: Adding Styles and a Consistent Look (Layout).Part IV: Adding a ControllerPart V: Adding Views for Displaying the ApplicationPart VI: Adding a Database.Part VII: Adding a Data ModelT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-13 Part I: Creating the ApplicationUsing visual web DeveloperVisual Web Developer offers different templates for building web applications.In this lesson we will use Visual Web Developer to create an empty MVC Internet application with HTML5 markup.When the empty Internet application is created, we can gradually add code to the application until it is fully finished. We can use C# as the programming language, with the newest Razor server code markup. Observe the content, the code, and all the components of the application. Note: Don’t panic if you do not understand every thing, the purpose is to have a full run towards application developmentT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-15Creating the Web ApplicationStart Visual Web Developer and select New Project.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-16Creating the Web ApplicationIn the New Project dialog box:Open the Visual C# templatesSelect the template ASP.NET MVC 3 Web ApplicationSet the project name to MvcDemoSet the disk location to something like c:\w3schools_demoClick OKWhen the New Project Dialog Box opens:Select the Internet Application templateSelect the Razor EngineSelect HTML5 MarkupClick OKT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-17Creating the Web ApplicationVisual Studio Express will create a project much like this:T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-18Part-IIExploring the Application FoldersMVC FoldersT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-20MVC FoldersThe folder names are the same in all MVC applications. The MVC framework is based on default naming. Controllers are in the Controllers folder, Views are in the Views folder, and Models are in the Models folder. You don't have to use the folder names in your application code.Standard naming reduces the amount of code, and makes it easier for developers to understand MVC projects.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-21The App_Data FolderThe App_Data folder is for storing application data. The Content FolderThe Content folder is used for static files like style sheets (css files), icons and images.Visual Web Developer automatically adds a themes folder to the Content folder. The themes folder is filled with jQuery styles and pictures. In this project you can delete the themes folder.Visual Web Developer also adds a standard style sheet file to the project: the file Site.css in the content folder. The style sheet file is the file to edit when you want to change the style of the application.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-22The Controllers FolderThe Controllers folder contains the controller classes responsible for handling user input and responses.MVC requires the name of all controller files to end with "Controller". Visual Web Developer has created a Home controller (for the Home and the About page) Account controller (for Login pages):T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-23The Models FolderThe Models folder contains the classes that represent the application models. Models hold and manipulate application data.The Views FolderThe Views folder stores the HTML files related to the display of the application (the user interfaces). The Views folder contains one folder for each controller. Visual Web Developer has created:Account folder, a Home folder, and a Shared folder (inside the Views folder).The Account folder contains pages for registering and logging in to user accounts.The Home folder is used for storing application pages like the home page and the about page.The Shared folder is used to store views shared between controllers (master pages and layout pages). T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-24The Scripts FolderThe Scripts folder stores the JavaScript files of the application.By default Visual Web Developer fills this folder with standard MVC, Ajax, and jQuery files:Note: The files named "modernizr" are JavaScript files used for supporting HTML5 and CSS3 features in the application. T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-25Part III: Adding Styles and a Consistent Look (Layout).Adding a LayoutThe file _Layout.cshtml represent the layout of each page in the application. It is located in the Shared folder inside the Views folder. Open the file and swap the content with this:HTML helpers are used to modify HTML output:@Url.Content() - URL content to be inserted.@Html.ActionLink() - HTML link to be inserted.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-27Razor SyntaxIn the code above, the code marked red are C# using Razor markup. @ViewBag.Title - The page title to be inserted there. @RenderBody() - The page content to be rendered there. T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-28Adding StylesThe style sheet for the application is called Site.css. It is located in the Content folder.Open the file Site.css and swap the content with the contents given in the next slide:T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-29T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-30The _ViewStart FileThe _ViewStart file in the Shared folder (inside the Views folder) contains the following content:@{Layout = "~/Views/Shared/_Layout.cshtml";}This code is automatically added to all views displayed by the application. If you remove this file, you must add this line to all views. T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-31 Part IV: Adding a Controller The Controllers FolderThe Controllers Folder contains the controller classes responsible for handling user input and responses.MVC requires the name of all controllers to end with "Controller".In our example, Visual Web Developer has created the following files: HomeController.cs (for the Home and About pages) and AccountController.cs (For the Log On pages):T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-33The Controllers FolderWeb servers will normally map incoming URL requests directly to disk files on the server. For example: a URL request like "" will map directly to the file "default.asp" at the root directory of the server.The MVC framework maps differently. MVC maps URLs to methods. These methods are in classes called "Controllers". Controllers are responsible for processing incoming requests, handling input, saving data, and sending a response to send back to the client.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-34The Home controllerThe controller file in our application HomeController.cs, defines the two controls Index and About.Swap the content of the HomeController.cs file with this:T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-35The Controller ViewsThe files Index.cshtml and About.cshtml in the Views folder defines the action (containing relevant data ) ActionResult views Index() retrieves Index.cshtmlActionResult views About() retrieves About.cshtmlin the controller.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-36Part V: Adding Views for Displaying the Application.The Views FolderThe Views folder stores the files (HTML files) related to the display of the application (the user interfaces). These files may have the extensions html, asp, aspx, cshtml, and vbhtml, depending on the language content.The Views folder contains one folder for each controller. Visual Web Developer has created an Account folder, a Home folder, and a Shared folder (inside the Views folder).The Account folder contains pages for registering and logging in to user accounts.The Home folder is used for storing application pages like the home page and the about page.The Shared folder is used to store views shared between controllers (master pages ; Title, menue, and layout pages). T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-38ASP.NET File TypesThe following HTML file types can be found in the Views Folder: T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-39The Index FileThe file Index.cshtml represents the Home page of the application. It is the application's default file (index file).Put the following content in the file:@{ViewBag.Title = "Home Page";} Welcome to W3Schools Put Home Page content hereT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-40The About FileThe file About.cshtml represent the About page of the application.Put the following content in the file:@{ViewBag.Title = "About Us";} About Us Put About Us content hereT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-41Run the ApplicationSelect Debug, Start Debugging (or F5) from the Visual Web Developer menu.Your application will look like this:Click on the "Home" tab and the "About" tab to see how it works.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-42Your First Application has launchedCongratulations. You have created your first MVC Application.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-43Part VI: Adding a Database. Creating the DatabaseVisual Web Developer comes with a free SQL database called SQL Server Compact.The database needed for this lesson can be created with these simple steps:Right-click the App_Data folder in the Solution Explorer windowSelect Add, New ItemSelect SQL Server Compact Local Database *Name the database Movies.sdf.Click the Add buttonT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-45Creating the DatabaseVisual Web Developer automatically creates the database in the App_Data folder. If SQL Server Compact Local Database is not an available option, means SQL Server Compact not installed.If SQL Server Compact not installed on your computer. Install it from this link: SQL Server Compact T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-46Adding a Database TableDouble-clicking the Movies.sdf file in the App_Data folder will open a Database Explorer window.To create a new table in the database, right-click the Tables folder, and select Create Table. Create the following columns:T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-47Adding a Database TableID is an integer (whole number) used to identify each record in the table.Title is a 100 character text column to store the name of the movie.Director is a 100 character text column to store the director's name.Date is a datetime column to store the release date of the movie.After creating the columns described above, you must make the ID column the table's primary key (record identifier). To do this, click on the column name (ID) and select Primary Key. Also, in the Column Properties window, set the Identity property to True: T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-48T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-49Adding a Database TableWhen you have finished creating the table columns, save the table and name it MovieDBs.Note:We have deliberately named the table "MovieDBs" (ending with s). Later we will the name "MovieDB" used for the data model. It looks strange, but this is the naming convention you have to use to make the controller connect to the database table. T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-50Adding Database RecordsUse Visual Web Developer to add some test records to the movie database.Double-click the Movies.sdf file in the App_Data folder.Right-click the MovieDBs table in the Database Explorer window and select Show Table Data.Add some records:Note: The ID column is updated automatically. You should not edit it.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-51Part VII: Adding a Data Model. MVC ModelsModelsThe MVC Model contains all application logic: business logic, validation logic, data access logic, (except pure view and controller logic.)MVC, models are used to both: Hold and manipulate application data.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-53The Models FolderThe Models Folder contains the classes that represent the application model. Visual Web Developer automatically creates an AccountModels.cs file that contains the models for application security. AccountModels contains:A LogOnModel, A ChangePasswordModel, and A RegisterModel.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-54Adding a Database ModelThe database model needed for this Lesson can be created with these simple steps:In the Solution Explorer, right-click the Models folder, select Add and Class.Name the class MovieDB.cs, and click Add.Edit the class:T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-55T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-56Adding a Database ModelNote:We have deliberately named the model class "MovieDB". In the previous section, we used the name "MovieDBs" (ending with s) used for the database table. It looks strange, but this is the naming convention we have to use to make the model connect to the database table. T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-57Adding a Database ControllerThe database controller needed for this lesson can be created with these simple steps:Re-Build your project: Select Debug, and then Build MvcDemo from the menu.In the Solution Explorer, right-click the Controllers folder, and select Add and ControllerSet controller name to MoviesControllerSelect template: Controller with read/write actions and views, using Entity FrameworkSelect model class: MovieDB (MvcDemo.Models)Select data context class: MovieDBContext (MvcDemo.Models)Select views Razor (CSHTML)Click AddT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-58Adding a Database ControllerVisual Web Developer will create the following files:A MoviesController.cs file in the Controllers folderA Movies folder in the Views folderT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-59Adding Database ViewsThe following files are automatically created in the Movies folder:Create.cshtmlDelete.cshtmlDetails.cshtmlEdit.cshtmlIndex.cshtmlT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-60Adding a Connection StringAdd the following element to the element in your Web.config file:T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-61MVC Application SecurityThe Models Folder contains the classes that represent the application model.Visual Web Developer automatically creates an AccountModels.cs file that contains the models for application authentication.AccountModels contains a LogOnModel, A ChangePasswordModel, andA RegisterModel:T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-62Account ModelT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-63The Change Password Modelpublic class ChangePasswordModel { [Required] [DataType(DataType.Password)] [Display(Name = "Current password")] public string OldPassword { get; set; } [Required] [StringLength(100, ErrorMessage = "The {0} must be at least {2}      characters long.", MinimumLength = 6)] [DataType(DataType.Password)] [Display(Name = "New password")] public string NewPassword { get; set; } [DataType(DataType.Password)] [Display(Name = "Confirm new password")] [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] public string ConfirmPassword { get; set; } }T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-64A Logon Modelpublic class LogOnModel { [Required] [Display(Name = "User name")] public string UserName { get; set; } [Required] [DataType(DataType.Password)] [Display(Name = "Password")] public string Password { get; set; } [Display(Name = "Remember me?")] public bool RememberMe { get; set; } }T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-65The Register Modelpublic class RegisterModel { [Required] [Display(Name = "User name")] public string UserName { get; set; } [Required] [DataType(DataType.EmailAddress)] [Display(Name = "Email address")] public string Email { get; set; } [Required] [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] [DataType(DataType.Password)] [Display(Name = "Password")] public string Password { get; set; } [DataType(DataType.Password)] [Display(Name = "Confirm password")] [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] public string ConfirmPassword { get; set; } }T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-66CongratulationsCongratulations. You have added your first MVC data model to your application.Now you can click on the "Movies" tab T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-67Internet ApplicationTo learn ASP.NET MVC, we will Build an Internet ApplicationWe will build an Internet application that supports adding, editing, deleting, and listing of information stored in a database.Part I: Creating the ApplicationPart II: Exploring the Application FoldersPart III: Adding Styles and a Consistent Look (Layout).Part IV: Adding a ControllerPart V: Adding Views for Displaying the ApplicationPart VI: Adding a Database.Part VII: Adding a Data ModelT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-68The End ASP.NET MVCT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-69Introductionto Visual Studio 2010T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-70Installation of Visual Studio/Visual Web ExpressGet and install a licensed copy of either the Visual Studio or Visual Web Developer.Visual Web Developer 2010 Express is part of the Visual Studio family. So, either of the environments can be used to build Web sites without any issue.Lets have introduction to Visual Studio 2010 environment.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-71Starting Visual Studio/Web DeveloperRun Visual Studio from the installed directory or Desktop or Start Menu.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-72Adding Projects and ItemsWeb ProjectsThe New Web Site dialog box enables you to create a new Web site on the local computer or on a remote computer, or to connect to a Web site location using FTP to read and write files. The following illustration shows the New Web Site dialog box.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-73Using the Integrated Development EnvironmentThe Visual Web Developer environmentT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-74Customizing Menus and ToolbarsThe menus and toolbars in Visual Web Developer are customizable. To customize menus commands and toolbars, click Customize in the Tools menu. Customize dialog boxThe Customize dialog box lets you select toolbars to display, create custom toolbars and menus, add and remove items from toolbars and menus, and change the appearance of toolbar and menu items.Using the Integrated Development EnvironmentT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-75Using the Integrated Development EnvironmentSolution Explorer WindowThe Solution Explorer window displays solutions, projects, and the items in those projects. It provides an organized view of the projects and their files as well as access to the commands that pertain to them.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-76Using the Integrated Development EnvironmentProperties WindowUsed to view and set the properties and events of objects that you are working with in the editor and page designer. Can also be used to edit and view file, project, and solution properties. To display the Properties window, click Properties Window in the View menu.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-77Editors, Designers, and ToolsPages are created and code is written using an editor and using designer windows. The functionality of the editor and of designers depends on the type of file or document being created.Web page editors and designers have two views: Graphical Design View Source-code ViewT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-78Editors, Designers, and ToolsWeb page designer, design viewDesign view displays the controls and other items in a WYSIWYG-like way. WYSIWYG: What You See Is What You Get.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-79Editors, Designers, and ToolsWeb page designer, Source viewSource view displays the source code for the file. Source view also supports editing features like word wrap, bookmarks, and line numbers.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-80Editors, Designers, and ToolsWeb page designer, Split viewSome editors can also display the design view and source view at the same time. This view is called Split view.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-81Editors, Designers, and ToolsEditing Web Pages in the DesignerAn ASP.NET Web page consists of visual elements and programming logic. Visual elements for the page include markup, server controls, and static text. Programming logic for the page includes event handlers and other code. The Toolbox displays controls that can be added to Visual Web Developer projects. To display the Toolbox, click Toolbox in the View menu.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-82CSS Properties and StylesThe CSS Properties window is used during the editing of an ASP.NET Web page. The window shows the styles that are used by the current selection in a Web page and the order of precedence for the styles. The window is used to add properties to an existing style, modify the already set properties, and create new inline styles.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-83Build and Debug OptionsBefore a Web application can be displayed, it must be compiled, or built. Visual Web Developer provides a robust set of build (compilation) and debugging options. By using build configurations, the components to build can be selected, or those unwanted can be excluded, and built details can be specified. Build configurations for solutions and projects can be created.Building begins the debug process. Building application helps in the detection of compile-time errors. These errors can include incorrect syntax, misspelled keywords, and type mismatches. T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-84The Output window displays these types of errors.Output window showing build information Build and Debug OptionsT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-85After building the application, the debugger can be used to detect and correct run-time problems, such as logic errors. The code can be stopped (break) as it is running. In break mode, the local variables and other data can be examined by using tools such as the Variable window, the Quick Watch dialog box, and the Memory windows. Build and Debug OptionsT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-86Debugging windowsThe Error List window displays errors, warnings, and other messages that are related to debugging.Build and Debug OptionsT2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-87Deployment OptionsWeb Site Project DeploymentThe typical Web deployment scenarios for Web site projects include:Deploying a Web site by using the Copy Web Site tool, which can copy and synchronize files between the source computer, a destination computer or location.Deploying a Web site by using the Windows  XCopy command.Deploying a prebuilt (precompiled) Web site.T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-88Product DocumentationThe Help can be accessed by pressing F1 in the IDE and by clicking View Help in the Help menu. Help can be obtained from either locally installed Help or documentation on the MSDN Web site. T2-Lecture-14 Ahmed Mumtaz Mustehsan www.w3schools.com1-89End ASP.NET MVCPart - IFor Lecture Material/Slides Thanks to: www.w3schools.com

Các file đính kèm theo tài liệu này:

  • pptt2_lecture_14_7334_2027099.ppt