TAILIEUCHUNG - ASP.NET 4 Unleased - p 43

Using the SqlDataSource Control LISTING .gridView { margin:0px auto; border:solid 4px black; background-color:white; } .gridView td, .gridView th { padding:20px; } html { background-color:silver; font-family:Georgia, Serif; } Show Movie Count ” Runat=”server” / From the Library of Wow! eBook Executing Database | 394 CHAPTER 9 Using the SqlDataSource Control LISTING @ Page Language C DOCTYPE html PUBLIC - W3C DTD XHTML EN http TR xhtml11 DTD html xmlns http 1999 xhtml head id Head1 runat server style type text css .gridView margin 0px auto border solid 4px black background-color white .gridView td .gridView th padding 20px html background-color silver font-family Georgia Serif style title Show Movie Count title head body form id form1 runat server div asp GridView id grdMovies DataSourceID srcMovies CssClass gridView Runat server asp SqlDataSource id srcMovies SelectCommand CountMoviesInCategory SelectCommandType StoredProcedure ConnectionString ConnectionStrings Movies Runat server From the Library of Wow eBook Executing Database Commands 395 div form body html Filtering Database Rows The SqlDataSource control includes a FilterExpression property that enables you to filter the rows returned by the control. You can define complex Boolean filters that include parameters with this property. For example the page in Listing retrieves all movies that have titles that match the string entered into the TextBox control see Figure . FIGURE Show matching movies. 9 LISTING @ Page Language C DOCTYPE html PUBLIC - W3C DTD XHTML EN http TR xhtml11 DTD html xmlns http 1999 xhtml head id Head1 runat server style type text css From the Library of Wow eBook 396 CHAPTER 9 Using the SqlDataSource Control td th padding 10px style title Show Filter Expression title head body form id form1 runat server div asp TextBox id txtTitle Runat server asp Button id btnMatch Text Match Runat server hr asp GridView id grdMovies DataSourceId srcMovies Runat server asp SqlDataSource id srcMovies SelectCommand SELECT Id Title Director DateReleased FROM Movies FilterExpression Title LIKE 0 ConnectionString ConnectionStrings Movies Runat server FilterParameters asp .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.