A comprehensive e-commerce web application built using ASP.NET Web Forms and C#. This platform enables dual user roles - customers can browse and purchase products while sellers can register and list their products for sale.
This Shopping Website is a full-featured e-commerce platform that demonstrates modern web development practices using ASP.NET Web Forms. The application supports a dual marketplace model where both customers and sellers can interact within the same platform.
Key Highlights:
- Dual user registration system (Customer/Seller)
- Product catalog with search and filtering
- Shopping cart functionality with session management
- Secure user authentication and authorization
- Responsive design with custom styling
- Database-driven product management
- Order processing and checkout system
- User Registration & Authentication - Secure account creation and login
- Product Browsing - View products with images, prices, and seller information
- Advanced Search - Search products by keywords with smart filtering
- Product Sorting - Sort by price (Low to High, High to Low)
- Category Filtering - Browse products by specific categories
- Shopping Cart - Add/remove products with quantity selection
- Profile Management - Update personal information and view order history
- Secure Checkout - Complete purchase process with order confirmation
- Seller Registration - Dedicated seller account creation
- Product Management - Add new products with images and descriptions
- Inventory Tracking - Monitor stock levels and availability
- Seller Dashboard - Manage listed products and view sales
- Category Selection - Organize products into appropriate categories
- Responsive Navigation - Easy-to-use menu system
- Session Management - Persistent shopping cart across sessions
- Image Upload - Support for product image uploads
- Password Recovery - Forgot password functionality
- Contact System - Customer support and inquiry handling
- Modern UI/UX - Clean, professional design
- ASP.NET Web Forms - Server-side web application framework
- HTML5 - Semantic markup structure
- CSS3 - Custom styling and responsive design
- JavaScript - Client-side interactivity and validation
- C# (.NET Framework 4.7.2) - Server-side programming language
- ASP.NET Web Forms - Web application framework
- ADO.NET - Data access technology
- Microsoft SQL Server - Relational database management system
- T-SQL - Database query language
- Visual Studio 2019 - Integrated development environment
- IIS Express - Web server for development
- NuGet - Package management
- Microsoft.CodeDom.Providers.DotNetCompilerPlatform (v2.0.1) - Roslyn compiler support
- iTextSharp - PDF generation (for invoices/receipts)
Shopping-Website/
βββ Website/ # Main web application
β βββ *.aspx # Web Forms pages
β βββ *.aspx.cs # Code-behind files
β βββ *.aspx.designer.cs # Designer files
β βββ img/ # Static images
β β βββ categories/ # Category images
β β βββ icons/ # UI icons
β β βββ logos/ # Brand logos
β β βββ products/ # Product images
β βββ css/ # Stylesheets
β βββ Web.config # Application configuration
β βββ Website.csproj # Project file
β βββ packages.config # NuGet packages
βββ packages/ # NuGet packages
βββ DbSql.sql # Database schema script
βββ Website.sln # Solution file
βββ LICENSE # MIT license
βββ README.md # Project documentation
The application uses a relational database with the following main tables:
Stores customer account information
- uname (VARCHAR(50), PRIMARY KEY) # User full name
- email (VARCHAR(50), UNIQUE) # Email address
- username (VARCHAR(20), UNIQUE) # Login username
- password (VARCHAR(20)) # User password
- phone (DECIMAL(10,0), UNIQUE) # Phone number
- dob (DATE) # Date of birth
- country (VARCHAR(20)) # Country
- state (VARCHAR(20)) # State
- city (VARCHAR(20)) # City
- gender (VARCHAR(10)) # Gender
- address (VARCHAR(500)) # Full address
- secq (VARCHAR(100)) # Security question
- seca (VARCHAR(20)) # Security answer
Stores seller account information (same structure as user_login)
Stores product information
- pname (VARCHAR(50), PRIMARY KEY) # Product name
- price (DECIMAL(20,2)) # Product price
- pimage (VARCHAR(250), UNIQUE) # Product image path
- category (VARCHAR(15)) # Product category
- sname (VARCHAR(50), FOREIGN KEY) # Seller name reference
- stock (INT) # Available quantity
- keywords (VARCHAR(500)) # Search keywords
Stores shopping cart items
- uname (VARCHAR(50), FOREIGN KEY) # User reference
- pname (VARCHAR(50), FOREIGN KEY) # Product reference
- quantity (INT) # Item quantity
Stores contact form submissions
- uname (VARCHAR(50)) # User name
- email (VARCHAR(50)) # Contact email
- message (VARCHAR(500)) # Message content
- Visual Studio 2019 or later
- SQL Server (Express/Developer/Standard)
- .NET Framework 4.7.2 or later
- IIS Express (included with Visual Studio)
- Open SQL Server Management Studio (SSMS)
- Execute the script in
DbSql.sql
to create the database and tables:-- Create database CREATE DATABASE website; USE website; -- Execute all table creation scripts from DbSql.sql
- Open
Website/Web.config
- Update the connection string:
<connectionStrings> <add name="cmpConnectionString" connectionString="Data Source=your-server;Initial Catalog=website;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings>
Update the connection string in all .aspx.cs
files:
SqlConnection con = new SqlConnection("Data Source=your-server;Initial Catalog=website;Integrated Security=True");
- Open
Website.sln
in Visual Studio 2019 - Restore NuGet packages (automatic)
- Build the solution (
Ctrl+Shift+B
)
- Set the Website project as startup project
- Press
F5
or click Start Debugging - The application will open in your default browser at
https://localhost:44337/
In Web.config
, you can configure:
- Database Connection: Update connection strings
- Session Timeout: Modify session state settings
- Error Handling: Configure custom error pages
- Security: Set authentication and authorization rules
Ensure the following directories have appropriate permissions:
Website/img/products/
- For product imagesWebsite/img/categories/
- For category images
-
Registration (
register.aspx
)- Create new customer account
- Provide personal details and contact information
- Set login credentials
-
Authentication (
login.aspx
)- Secure login with username/email and password
- Session management for persistent login
- Password recovery option
-
Shopping Experience (
index.aspx
)- Browse featured products
- Search products by keywords
- Filter by categories and price
- Sort products (price low-to-high, high-to-low)
-
Cart Management (
cart.aspx
)- Add products to shopping cart
- Modify quantities
- Remove items
- View total cost
-
Checkout Process (
checkout.aspx
)- Review order details
- Confirm purchase
- Complete transaction
-
Seller Registration (
sellerRegister.aspx
)- Create seller account
- Provide business details
-
Seller Authentication (
sellerSignIn.aspx
)- Secure seller login
- Access to seller dashboard
-
Product Management (
addProducts.aspx
)- Add new products with images
- Set prices and categories
- Manage inventory levels
- Update product descriptions
-
Seller Dashboard (
sellerProfile.aspx
)- View listed products
- Monitor sales performance
- Update seller information
index.aspx
- Homepage with product catalog and search functionalityabout.aspx
- Company information and mission statementcontact.aspx
- Contact form and business detailsblog.aspx
- News, updates, and shopping tipscategories.aspx
- Product categories and filtered views
login.aspx
- User login form with validationregister.aspx
- Customer registration formsellerSignIn.aspx
- Seller login portalsellerRegister.aspx
- Seller registration formforgotpass.aspx
- Password recovery system
profile.aspx
- Customer profile managementcart.aspx
- Shopping cart with item managementcheckout.aspx
- Order processing and payment
sellerProfile.aspx
- Seller account managementaddProducts.aspx
- Product listing and management
- Responsive Navigation - Fixed header with dropdown menus
- Product Grid - Clean product display with images and details
- Search & Filter - Advanced search with sorting options
- Shopping Cart Icon - Real-time cart item counter
- Footer Links - Organized footer with company information
- Image Hover Effects - Product image interactions
- Form Validation - Client and server-side validation
- Session Indicators - Login status and user information
- Loading States - Visual feedback during operations
- Password Encryption - Secure password storage
- Session Management - Secure session handling
- SQL Injection Prevention - Parameterized queries
- Input Validation - Server-side validation for all forms
- User Data Security - Protected personal information
- Secure File Upload - Validated image uploads
- Error Handling - Custom error pages without sensitive information
- Chrome 80+ β
- Firefox 75+ β
- Safari 13+ β
- Edge 80+ β
- Internet Explorer 11+
β οΈ (Limited support)
- Payment Integration - No actual payment gateway (demo only)
- Email Notifications - Email system not implemented
- Advanced Search - Limited search filters
- Mobile Responsiveness - Needs optimization for mobile devices
- Image Optimization - No automatic image resizing
- Payment Gateway Integration (PayPal, Stripe)
- Email Notification System
- Advanced Product Filtering
- Mobile-First Responsive Design
- Product Reviews and Ratings
- Order Tracking System
- Admin Dashboard
- Analytics and Reporting
We welcome contributions to improve the Shopping Website! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Follow C# coding conventions
- Write clear commit messages
- Update documentation for new features
- Test thoroughly before submitting PR
- Ensure database changes are documented
- Bug Fixes - Report and fix issues
- New Features - Add functionality
- UI/UX Improvements - Enhance user experience
- Performance Optimization - Improve application speed
- Security Enhancements - Strengthen security measures
- Documentation - Improve project documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- β Commercial Use - Use for commercial projects
- β Modification - Modify the code
- β Distribution - Distribute the code
- β Private Use - Use privately
- β Liability - No warranty provided
- β Warranty - No warranty provided
# Clone the repository
# Open in Visual Studio
start Website.sln
# Update connection string in Web.config
# Build and run (F5)
- Navigate to the homepage
- Register as a customer or seller
- Start shopping or listing products
- Enjoy the e-commerce experience!
Made with β€οΈ using ASP.NET and C#
This project demonstrates modern web development practices and serves as an educational resource for learning e-commerce application development.