Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Build Your Own ASP.NET 2.0 Web Site Using CSharp And VB (2006) [eng].pdf
Скачиваний:
74
Добавлен:
16.08.2013
Размер:
15.69 Mб
Скачать

Chapter 12: Advanced Data Access

departmentsGrid.DataSource = dataSet.Tables["Departments"]; departmentsGrid.DataBind();

Execute this command, and all departments called New Department will be removed.

Summary

This chapter has given us the chance to explore some more important concepts of ADO.NET. First, you learned about the data source controls, and how they can be used to build code-free data binding. With just a few mouse clicks, you were able to build editable grids of data!

We also investigated the DataSet class, and learned how to use it in our intranet application. We then moved on to learn about the constructs of DataSets, including DataTables and DataViews. We also learned how to populate DataSets using SqlDataAdapters. Finally, we looked at sorting, paging, and filtering data using DataViews, and updated a data source from a modified DataSet using the

SqlCommandBuilder.

In the next chapter, we’ll be looking at ASP.NET’s security features. Using ASP.NET’s form-based security capabilities, we’ll learn how to restrict each user’s access to the specific web forms we want them to be able to use, while still allowing public access to other parts of the site. We’ll also take a look at some controls that make building login and logout mechanisms a snap.

526