https://github.com/fkucukkara/razor101
This project serves as a template demonstration of ASP.NET Core Razor Pages, showcasing the fundamental concepts and best practices of Razor Pages development. It's built using .NET 9.0 and follows modern web development patterns.
https://github.com/fkucukkara/razor101
csharp dotnet-core razor-pages template
Last synced: about 2 months ago
JSON representation
This project serves as a template demonstration of ASP.NET Core Razor Pages, showcasing the fundamental concepts and best practices of Razor Pages development. It's built using .NET 9.0 and follows modern web development patterns.
- Host: GitHub
- URL: https://github.com/fkucukkara/razor101
- Owner: fkucukkara
- License: mit
- Created: 2025-05-18T15:26:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-28T13:07:56.000Z (10 months ago)
- Last Synced: 2025-09-28T15:18:49.968Z (10 months ago)
- Topics: csharp, dotnet-core, razor-pages, template
- Language: HTML
- Homepage:
- Size: 996 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Razor101 - ASP.NET Core Razor Pages Sample Project
This project serves as a template demonstration of ASP.NET Core Razor Pages, showcasing the fundamental concepts and best practices of Razor Pages development. It's built using .NET 9.0 and follows modern web development patterns.
## ๐ Features
- Clean and organized Razor Pages project structure
- Bootstrap-based responsive design
- jQuery integration for client-side functionality
- Built-in error handling and privacy pages
- Static file serving (CSS, JavaScript, images)
- Preconfigured development and production settings
## ๐ ๏ธ Prerequisites
- [.NET 9.0 SDK](https://dotnet.microsoft.com/download) or later
- Any code editor (recommended: Visual Studio 2022 or Visual Studio Code)
## ๐ฆ Project Structure
```
Razor101/
โโโ Pages/ # Razor Pages and their code-behind files
โ โโโ Shared/ # Shared layouts and partial views
โ โโโ _ViewImports.cshtml # Common imports and tag helpers
โ โโโ _ViewStart.cshtml # Common view configurations
โ โโโ Error.cshtml # Error handling page
โ โโโ Index.cshtml # Home page
โ โโโ Privacy.cshtml # Privacy policy page
โโโ wwwroot/ # Static files (CSS, JS, images)
โ โโโ css/ # Stylesheet files
โ โโโ js/ # JavaScript files
โ โโโ lib/ # Third-party libraries
โโโ Properties/ # Project properties and launch settings
โโโ appsettings.json # Application settings
โโโ Program.cs # Application entry point and configuration
```
## ๐ Getting Started
1. Clone the repository:
```powershell
git clone [repository-url]
cd Razor101
```
2. Restore dependencies:
```powershell
dotnet restore
```
3. Run the application:
```powershell
dotnet run
```
4. Open your browser and navigate to:
```
https://localhost:5001
```
## ๐ง Configuration
The project includes two configuration files:
- `appsettings.json`: Main configuration file
- `appsettings.Development.json`: Development-specific settings
## ๐งช Features Demonstrated
1. **Razor Pages**: Model-View-ViewModel pattern with code-behind files
2. **Layouts**: Shared layout using `_Layout.cshtml`
3. **Static Files**: Serving static content from wwwroot
4. **Error Handling**: Custom error page implementation
5. **Configuration**: Environment-based settings management
6. **Tag Helpers**: Built-in ASP.NET Core tag helpers usage
## ๐ Security
- Built-in security features of ASP.NET Core
- HTTPS configuration
- Anti-forgery token validation
- Secure cookie handling
## ๐ฏ Best Practices Implemented
- Clean separation of concerns
- Proper use of layouts and partial views
- Environment-specific configurations
- Built-in dependency injection
- Proper static file organization
## ๐ Learning Resources
- [Official ASP.NET Core Documentation](https://docs.microsoft.com/en-us/aspnet/core/)
- [Razor Pages Documentation](https://docs.microsoft.com/en-us/aspnet/core/razor-pages/)
- [ASP.NET Core Tutorials](https://docs.microsoft.com/en-us/aspnet/core/tutorials/)
## License
[](LICENSE)
This project is licensed under the MIT License. See the [`LICENSE`](LICENSE) file for details.