ASP.NET Basics / Creating a Web Page
Subtitles of the Movie
Let's create a Web Page. I want to create just a very simple Web page in the Visual Web Developer and give you just a very quick Hello world treatment of a Web page and then I'll go back and explain a lot of what happened and of what we can do, so let's go to Start. I'm running Windows 7, by the way, so yours could look slightly different and start Microsoft Visual Web Developer 2008 Express Edition. That's what I'm running. Now I'm going to create a Web site, so come to Create and choose Web Site. Now I could have chosen File, New, Web Site and that sort of thing. Now notice I'm creating an ASP.ENT Web Site. The Location of this is a File System and I'll just call it Website3, actually I'm going to change this. I'm going to put VTCExample and the Language I'm going to code this in Visual Basic and I can also use C#. I'll do Visual Basic here and I'll just click OK. It's going to do a lot of the work for me. It's going to basically create a Web Form and we'll talk about this really quickly. Notice I see my HTML code here. I can see over here that my Project or my Solution Name is VTCExample, I've got a Default.aspx page and that's what I'm looking at right here and it's on this tab. On this tab is that Start page that I saw when I started up and I can click on Default.aspx. Now obviously, if I open other pages up they will tab across the top here. Now, I'm going to click and go to Design. We'll talk more about all this stuff later and then I will mouse over the Toolbox here and I am going to scroll up and I am going to expand the Standard Toolbox area and I'm going to double-click on the button and notice that put a button on here. Then I'll click just to the right of the button and hit Enter a couple of times. I'll go back to the Toolbox and I'll put in a label. All I want to have happen here is, is when I click on the button that the label says You clicked. And so I've dropped these onto my Web Form and now I will simply double-click on my button and it will bring up what's called my Code Behind Page and notice this is an Event on this button. Now if I scroll over I can see all the code. And what I want to do is that Label I dropped, it's called Label1, so I'll say, Lable1.text equals You clicked. And I will go back to my Default page and now I'm going to run this. Now notice, if I click on Run it's going to compile this, get it all ready and it's going to say, wait a minute - do you want to debug this, or do you want to run it without debugging? We'll run without debugging and I'll click OK and this is going to open up this particular Web page. Now at this point I went to the Server and I requested a Default.aspx. We will talk about all of this in a different video, but understand I, from the Browser, reached out to the Web server and said, I want to see the Default.aspx page. Then when it got to my client machine, I can now click on the button and when I do I click the button, it goes back to the Server and it runs that application and it says: Change the label to You clicked and pass this back to the end user and there you go. You can see that I clicked. Now, that is a very simple ASP.NET Web Page. Now a lot happened there and there's a lot of things that you can do there and so what we'll do now over the next few videos is build on this and add some other functionalities and we'll talk about the Controls that you can use and so forth. Just notice here that if I close the Browser down I'm right back here and I can double-click my button, go right back to my Code Behind and see what all's going on there. So, that's a simple Web Page, Web Form and in the next few videos we'll kind of start to take this apart and look at what all's happened here and how we can use it.
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
United States 