Home
Username:
Password:
Microsoft ASP.NET 3.5 Tutorials

Introduction / ASP.NET in Action

Subtitles of the Movie

Now let's take a look at ASP.NET in action and what I'm going to do is show you a very, very simple animation here. I'm going to take you through the steps of exactly how ASP.NET works, so let's get at it. First of all we have a client machine with a Browser. Now, this is a machine sitting out there somewhere on the Internet and it has a Browser - Internet Explorer, Firefox, anything like that. Now, somewhere out there is a Web server, OK and we want to access a Web page off of that Web server and this Web server has been registered with a domain name, has been registered out there in DNS as www.mark.com and the files for that, all those records, point to the IP Address for this Web Server right here and I have a number of files out there that make up the web site for mark.com and that's what this user is going to access. Now also, as part of my web application, or my Web site, I have a Database out here. For this course we will say it's a SQL Server Database and it contains records, or information that I might want to share with my users on my web pages and so the first thing that's going to happen is the user is going to open up a browser - they're going to open Firefox, we'll say and they're going to type www.mark.com. Now it's going to use DNS to resolve the address to connect to the Web server and the Web server has this file sitting on its hard drive and we'll say that it's default or the default file or default ASPX. It is an ASP.NET file. Now, what that means is this particular page, right here, has html or XHTML markup that tells the page how to show up in the end user's browser, but it also has some server side programming that's written in either C# of VB.NET and that is actually ASP.NET. And so, ASP.NET code is going to tell it that when somebody requests this page before you send it back to them, I want you to kick it up to the Database and run this code that will connect to the Database, request certain data, bring it back, place it into the page and then send it back to them. So, the user makes their request for this particular page right here. They put in www.mark.com, this is the default ASPX page and so when the page gets called up it sees that server side code and it says, oh, wait a minute. Before I send this page back to the browser I've got to run this code. Well, this code makes a connection to the Database, it runs a query and it returns the data from the Database and it writes it into the web page. Now this is kind of some smoke and mirrors that happens on the Web Server. It's part of ASP.NET and it will merge the result-set of this query into the HTML, or the ASP.X, or the markup language right here and in this ASPX page it will build the HTML to include this data that came back from the Database. Then it will pass that page back to the browser. Now that's it in a nutshell. We are simply going to concentrate in this course really on this part right here. We are going to build web pages and inputs called a Web Form with ASP.NET coding and our ASP.NET coding is going to tell us how to connect to Databases, to verify certain data here, to do all kinds of things. So, really what happens on a Web server when you're running ASP.NET, if you want to think of it you have a little ASP.NET department in here and anytime somebody requests a page, since it's an ASPX page, it tells it, wait a minute, before you send this page back to anybody, run it through the guys down at the ASP department and they will run this ASP.NET code and if it says connect to the Database it'll go to the Database, make a connection, bring back and will merge that in. If it says check the date and time of something it will go check the date and time and so forth and this is called Server Side Programming. So ASP.NET is Server Side Programming. This is programming functionality that's only going to happen, if you drew an imaginary line right here over on the Server Side of things and again, predominantly we use Server Side code to connect the Databases or other resources. Now, if we pass this file back to the browser we can also have code in here that runs on the browser. So, let's say the file we send back has a form that the client wants to fill out. They fill it out and when they click Send on their form, that client side code can run right here on the browser side and check to make sure everything was filled out before it sends it back up. But that roughly is ASP.NET in action. Now what I want to do is, I want to run through that one more time so that you got it. So we start off with a Web Browser and a Web server and a Database. There's a file on the Web server, we make our request for that file, it processes the ASP instructions, connects to the Database, brings some information back from the Database, writes it into the file, renders the file up as total HTML, XHTML, some sort of markup language, passes it back to the Browser and then it appears on the Browser's screen and the end user uses the page. Pretty straightforward, very simple. I hope this will help you understand what's going on with ASP.NET.

Tutorial Information

Course: Microsoft ASP.NET 3.5
Author: Mark Long
SKU: 34102
ISBN: 1-93633412-7
Release Date: 2010-03-24
Duration: 6 hrs / 69 lessons
Work Files: Yes
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available