This project is an ASP.NET MVC web application focused on using ViewBag to transfer data between controllers and views.
It demonstrates how dynamic data can be passed and displayed in a structured web application using the MVC pattern.
Key concepts:
- MVC architecture (Model-View-Controller)
- ViewBag for dynamic data transfer
- Controller-to-view communication
- Razor view rendering
✅ Use of ViewBag for passing data
✅ Dynamic content displayed in views
✅ MVC structure (Controllers, Views)
✅ Page routing and navigation
✅ Clean separation of concerns
- C#
- ASP.NET MVC
- Razor Views
- HTML5 & CSS
- Visual Studio
Using Visual Studio:
- Open the solution file
- Build the project
- Click Run (IIS Express)
Use .NET CLI: dotnet build, dotnet run
- The controller assigns values to ViewBag
- The view accesses ViewBag data dynamically
- The data is rendered on the page
- Users interact with the displayed content
- ViewBag is loosely typed (less safe than models)
- Limited data validation
- Basic UI design
- Replace ViewBag with strongly typed models
- Add database integration
- Improve UI/UX design
- Implement forms and user input handling
Keabetswe Masole
Software Used:
Visual Studio 2022