Car Display Page - Weakly Typed View

This example demonstrates using a Weakly-Typed View to display a collection of Cars. The controller passes the collection of Car objects to this View using the ViewBag. This View is considered a Weakly-Typed View because it doesn't have a Model class assigned to it. Views that do not have a Model class assigned to it can only retrieve data from the Controller using the ViewData/ViewBag collection. This View uses two separate Controller methods to handle the processing of this page. The Controller's "GetCars" method is used to query the database, create a collection of Cars, and store the collection of Cars in the ViewBag that is used in generating the HTML content for this page before it is delivered to the client. The View also uses the Controller's "SearchCarsByMake" method to process the HTML form that is used to perform a search based on the user input for make. The form uses HTTP Post to submit the form data to the Controller's method.



Make: Model: Year: Value:
nissan versa 2025 $100,001.00
test test 2025 $0.00
toyota camry 2024 $38,000.00
Cadillac CTV5 2025 $60,000.00
dqd qdq 2025 $0.00
Cadillac asdasd 2023 $0.00
Ford Crown Victoria 2024 $10,000.00
QEJKBF KJBF 1931 $2,447,242.00
Audi Q7 2024 $68,500.00
BMW 535xi 2023 $56,750.00
BMW 740i 2024 $110,000.00
Chevy Camaro 2020 $35,000.00
Chevy Suburban 2022 $18,799.00
Dodge Charger Hellcat 2023 $58,000.00
Ford Mustang 2024 $44,870.00
Ford Explorer 1994 $2,500.00
Ford Explorer 2024 $38,000.00
GM Yukon 2023 $35,000.00
Cadillac Escalade 2024 $85,000.00
Mercedes-Benz C300 2015 $18,000.00
Mercedes-Benz S550 Maybach 2024 $250,000.00
Mercedes-Benz S550 2024 $100,000.00
Mercedes-Benz GLE350 2024 $90,000.00
Mercedes-Benz C300 2024 $52,750.00
Mercedes-Benz GLS450 2024 $135,000.00
Mercedes-Benz GLE350 2020 $60,000.00
Tesla S-Type 2023 $89,999.00