Another difference in the way pages are created in ASP.NET versus using a dynamic web template in Expression Web is that, although every time I click on one of these links to an agent, it seems like I am getting a new page with the agent's details. There aren't really separate pages for all of the agents in the database.
Let me switch back to Expression Web and show you what I mean. So I have a file called agents, that's the one we are looking at, that has this list of all of the agents on one page. Then I have another file called each_agent, and that one file called each_agent is what's used to generate each of those agent pages.
Now, I could have named it anything I wanted, but I find it easy to remember; each_agent versus agents helps me distinguish between those pages. Again switching back, this page is created by the each_agent page, but this is agent number 3, and if I click on agent number 4, you will see agent number 4.
But if you are looking in the folders list in Expression Web for all of those agent pages, you are never going to find them. There is one each_agent page that creates each of the agents dynamically by pulling content out of the database. That illustrates one of the more significant differences between ASP.NET pages and static HTML pages. Those pages are created dynamically on the fly and they are created in response to a user request.
So to show you another example of this that may be even more familiar, let me switch over to a page I have saved here, the Total Training website. If you have been to this site or many sites like it, you have seen that there are search fields. So if I search for Expression Web on the Total Training website, what I am really doing is making a request of a database by sending a little bit of information.
When I click on this Find button, that information is passed to the server, to the database, and then the database sends back results based on that request. So what you see in the results of your search is what happens at the end of that chain of events. We will look at that more in a moment, but let's go back now and look at our Listings page again. When we Preview this, remember in each listing we have the option to edit. Well, this Log In field is really doing in essence the same thing that search field did. When you enter a User Name and Password into this form, you are sending information to the server and to the database, and it responds with a page based on the data that you entered.
So dynamic websites offer a range of functionality and interactivity that's not possible with static pages; things like search fields with instant results, and even more complicated things like shopping carts that gather items as a user progresses through a site. Even discussion boards and other features that display user generated content on a web page. All of those kinds of features are created dynamically in much the same way the pages on this little real estate site are created.
Ultimately, database driven sites can get as creative and advanced as your imagination, skills, and budget allow. But in this training, we do have limited time and we are limited by what Expression Web is capable of. This is a 1.0 version product after all and its designed to simplify the development process in a way that does limit your options when you are doing ASP.NET development like this.
We can do cool things, like randomly display data on the front page every time it refreshes, but some of the most advanced things you see in ASP.NET sites, we won't be able to do just in Expression Web.
That said, we will create all of the functionality and features that you see in this real estate site, from scratch, connecting to a SQL Server express data source and displaying the contents in a variety of ways on a series of web pages. Throughout this series, you will learn how to do all of those things.
We will also spend some time looking at XML and XSL.
That's how this Testimonials page was created. Each of these testimonials is contained in a XML file, not in the database, but they are displayed in much the same way, and they are formatted in XSL, and as you will see, Expression Web will create the XSL file for you when you do the formatting in Expression Web. It's pretty cool.
Ultimately, I hope you will consider this training an introduction to ASP.NET web development, with a focus on Expression Web's features for working with ASP.NET, to create things like the random display of elements on the front page, as well as XML, and ultimately web parts, which we will get to toward the end of the series.