gfxgfx
 
Welcome, Guest. Please login or register.

Login with username, password and session length
 
gfx gfx
gfxgfx
 
Howdy. Welcome to Madlinux Forum/Blog
Feel free to apply for an account to post something interesting.
 
gfx gfx
gfx
204 Posts in 100 Topics by 1 Members - Latest Member: zzsql September 04, 2010, 06:09:41 PM
*
gfx*HomeHelpSearchCalendarLoginRegistergfx
gfxgfx
      « previous next »
Pages: [1] Print
Author Topic: ASP.NET Summary Practice  (Read 792 times)
zzsql
Administrator
Full Member
*****
Posts: 205



View Profile
« on: September 04, 2008, 12:44:41 PM »

- Validation
- Add/Update/Delete a user with a gridView
- Rank update with DDL
- BIMS Grid View
- Site Navigation with different web.sitemap
- Security

Practice Exercises:
- Mortgage Calculator
- Flag display with radio Button List (RBL)
- Temperature Conversion Page
- User Management
- 6 Validation Tools
- Style Sheets
- Master Pages
- Page Titles (Untitled Page == Bad)
- Security Administration. Users, Roles, Directory Access, authentication type.
- Create a page with the functionality of Add/Edit/Delete a user from a database
- Rank update with DDL or Marital Status
- Change all page titles from "Untitled Page"
« Last Edit: September 05, 2008, 07:35:02 AM by zzsql » Logged
zzsql
Administrator
Full Member
*****
Posts: 205



View Profile
« Reply #1 on: September 05, 2008, 11:37:19 AM »

 (to search for customers. DataView underneath with customer info. DDL specifies who is shown.
Under that, detailsView showing total orders for that user.

1. Drag and drop 2 SqlDataSource(s). Name something intuitive
2. Configure data sources First!
   - Click little arrorw, configure data source.
   - select proper database
   - select "Customers" table and click CustomerID, and CompanyName
   - Order by comapny name (if desired)
   - Must select a primary key to do inserts.
   - Test, finish.
   - Go back into data source, go to "Specify" and add a +', '+ between the fields to concatenate.
3. Add a DDL to the top Data Source.
   - Configure data source, should get a 3-drop-down menu, select the proper data source and fields.
4. Do a count of customer's orders.
   - Configure second data source.
   - Select query builder and select "Customers" and "Orders".
- See screen capture called query-builder-orders-customers-count.jpg
- R-click in the white-area next to the tables, select "Group by".
- egads.
- drop data list, select the data source, then edit templates.
- He really sped through the rest of this but basically, here are the steps:
  - drop 2 data sources, a DDL and a DetailsView and a Data List.
  - See the image above.

Resulting query is this:
SELECT Customers.CustomerID, Customers.CompanyName, Customers.ContactName, Customers.City, Customers.Country, Customers.Phone, COUNT(Orders.OrderID) AS [Total Orders] FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID GROUP BY Customers.CustomerID, Customers.CompanyName, Customers.ContactName, Customers.City, Customers.Country, Customers.Phone HAVING (Customers.CustomerID = @CustomerID) ORDER BY Customers.CompanyName
« Last Edit: September 05, 2008, 12:02:11 PM by zzsql » Logged
gfx
Pages: [1] Print 
gfx
Jump to:  
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!