One ASP.NET teaches all you need to know about the elements of programming with ASP.NET, including Web Forms, MVC, AJAX, Web Pages, Web API and SignalR. We assume no prior ASP.NET experience, but even experienced programmers will find much that is new.
Jeffrey T. Fritz is a Microsoft MVP, an ASPInsider and Developer Evangelist for Telerik with over 15 years of experience building large-scale multi-tenant web applications in the software-as-a-service model. Most recently, you can find him writing about ASP.NET in MSDN Magazine and CodeProject.
Section Introduction Transcripts
Section Introduction Transcripts
Web Forms Hi. This is Jesse Liberty from Pluralsight. We begin our discussion of One ASP. NET by considering Web Forms. Web Forms or classic ASP. NET can use HTML controls as server-side controls by adding runat = server, and they tend to make an easier transition from HTML. They also tend to make for smaller pages. Only two events are supported for HTML controls, OnServerClick and OnServerChange. In addition to HTML controls, Web Forms can use Web Controls. Web Controls provide a more consistent object interface, and they provide richer controls composed of multiple HTML controls. Let's get started by looking at our first Web Form.
Advanced Web Forms Hi. This is Jesse Liberty for Pluralsight. In this module, we move on to talk about some advanced concepts in Web Forms. We're going to start by talking about state management. You've already seen session state. Session state works across a given browser, and the data is maintained server side. And alternative to session state that we'll look at is application state, which allows multiple users on the same web server to share a state. This too is maintained server side. Cookies on the other hand are maintained on the client side and are per browser. We've seen viewstate. That's maintained on the client side. You see the viewstate being passed back and forth in the HTML. You store your data and the state of your page in viewstate. And when you take the data out of viewstate or a session state or an application state, it must be cast on the way out. To get a sense of how all this comes together, let's take a look at a couple of demos having to do with state management.
Advanced MVC Hi. This is Jesse Liberty for Pluralsight, and welcome to our module on advanced topics in ASP. NET MVC. Let's get started by talking a little bit about database management. What do we want to do when we want to update the model? One solution during the time that we're developing is to reset the database every time it changes. Another even more radical solution is to reset the database every time you start the application. That way during development you're starting clean. If you're doing that, you're going to want to see the database with starter values so that when you begin you don't have to enter a number of objects. To do this, you're going to create a class derived from DropCreateDatabaseAlways<T>, and that of course instructs the database to drop and recreate the database each time it starts. And then you'll add new items in the seed method that you'll override, and then you'll call the base seed method. That allows you to add new fields, and when you do you're going to want to recreate your controller and views. Let's take a look at just how easy this is to do.
Web Pages Hi there. My name is Jeff Fritz, and we're going to discuss ASP. NET Web Pages. This is a simplified framework that we can use to build ASP. NET content quickly and easily. Web Pages are a throwback to Classic ASP, those days when we had server-side code intermingled with our client-side markup. Now, we can write our web page content with Razor syntax with all the great features that are available to us in Razor along with fantastic syntax highlighting from our tools. We don't have to be limited to just Visual Studio. We can also use Microsoft WebMatrix, which is a slimmed- down integrated development environment for building websites. So, let's take a look at building our first Web Pages site. We're going to take a look at what the new content is that defaults inside of a project when we start a Web Pages site, and we're going to add some Hello World type of content and show you how we can put the current date and time on the screen. So, let's get to our demo.