List of public pages created with Protopage

Home

News

MSNBC - Top Stories

This Week in Tech

PopSugar

FOXNews.com

Fresh Air

CNN.com International Edition

ESPN.com

Bookmarks

Bookmarks

Bookmarks

Plain sticky notes

Sticky note

Click 'edit' on the Bookmarks widget to add all of your favorite sites to your page for quick access

Notes

Plain sticky notes

Sticky note

Sticky note

Click here to type

Alan Bramwell / Anthony Kidd

Bookmarks

Bookmarks

Rich sticky notes

Anthonyy

This Ones for you Anthony

Manchester City

Bookmarks

Bookmarks

Manchester United

Bookmarks

Bookmarks

Ben and Jacks

Bookmarks

Bookmarks

Rich sticky notes

Rich text note

Designer Oak House 3xl Tea shirt Treble 2023 just £35 
Comes with Infinity Discount Card worth £35 plus Educating George Book worth £101 and 1 years University Education Support worth £1024 

Manchesters Kiddo

Bookmarks

Bookmarks

Rich sticky notes

Anthony Kidd

I had created Manchesters Kiddo - I thought I had.

You now have Kiddos Manchester Too............

Holy Oak Tee Shirts

Bookmarks

Bookmarks

Rich sticky notes

Rich text note

Order your Holyoak Cocktails Tee Shirt from Hitec Computers Manchester and get £14 discount with your Infinity / Manchester / Cocktails Discount Card.  Save just £7 if only using the Manchester Discount Card.

C#

Rich sticky notes

Rich text note

C# Code for a Shopping Cart Search Bar

Here's a C# code snippet for a basic shopping cart search bar that filters products based on their names:

C#
using System.Collections.Generic;using System.Linq;public class ShoppingCart{    private List<Product> products = new List<Product>();    public void AddProduct(Product product)    {        products.Add(product);    }    public List<Product> SearchProducts(string    searchTerm)    {        return products.Where(p => p.Name.Contains(searchTerm, StringComparison.OrdinalIgnoreCase)).ToList();    }}public class Product{    public string Name { get; set; }    public decimal Price { get; set; }    // Other product properties}

Explanation:

  1. ShoppingCart Class:

    • The ShoppingCart class represents the shopping cart and contains a list of Product objects.
    • The AddProduct method adds a product to the cart.
    • The SearchProducts method takes a search term as input and returns a filtered list of products whose names contain the search term (ignoring case sensitivity).
  2. Product Class:

    • The Product class defines the properties of a product, such as its name and price. You can add more properties as needed.

Usage:

C#
// Create a shopping cartShoppingCart cart = new ShoppingCart();// Add products to the cartcart.AddProduct(new Product { Name = "Product A", Price = 10.0m });cart.AddProduct(new Product { Name = "Product B", Price = 20.0m });cart.AddProduct(new Product { Name = "Product C", Price = 15.0m });// Get the search resultsstring searchTerm = "Product A";List<Product> searchResults = cart.SearchProducts(searchTerm);// Display the search resultsforeach (var product in searchResults){    Console.WriteLine($"Product Name: {product.Name}, Price: {product.Price}");}

Enhancements:

This code provides a basic foundation for a shopping cart search bar. You can customize and extend it to meet your specific requirements.

C# / MVC / Razor

Rich sticky notes

Rich text note

I'd be glad to provide a C# MVC implementation for a view with a search bar:

Model:

C#
public class Product{    public int Id { get; set; }    public string Name { get; set; }    public decimal Price { get; set; }    // Other product properties}

Controller:

C#
public class HomeController : Controller{    private readonly List<Product> _products;    public HomeController()    {        // Initialize the product list with sample data        _products = new List<Product>        {            new Product { Id = 1, Name = "Product A", Price = 10.0m },            new Product { Id = 2, Name = "Product B", Price = 20.0m },            new Product { Id = 3, Name = "Product C", Price = 15.0m }        };    }    public IActionResult Index(string searchTerm)    {        var searchResults = _products.Where(p => p.Name.Contains(searchTerm, StringComparison.OrdinalIgnoreCase)).ToList();        return View(searchResults);    }}

View (Index.cshtml):

Razor CSHTML
@model IEnumerable<Product>@{    ViewData["Title"] = "Home Page";}<div class="container">    <form asp-action="Index" method="get">        <div class="form-group">            <label for="searchTerm">Search:</label>            <input type="text" name="searchTerm" id="searchTerm" class="form-control">           </div>        <button type="submit" class="btn btn-primary">Search</button>    </form>    <table class="table">        <thead>            <tr>                <th>ID</th>                <th>Name</th>                <th>Price</th>            </tr>           </thead>        <tbody>            @foreach (var product in Model)            {                <tr>                    <td>@product.Id</td>                    <td>@product.Name</td>                    <td>@product.Price.ToString("C")</td>                </tr>            }        </tbody>    </table>   </div>

Explanation:

  1. Model: The Product model defines the properties of a product.
  2. Controller: The HomeController contains a list of products and the Index action method. The Index action method handles the search functionality. It takes the search term as a parameter, filters the products based on the search term, and passes the results to the view.
  3. View: The Index.cshtml view displays the search form and the search results. The form submits the search term to the Index action method. The view iterates over the search results and displays them in a table.

To use this code:

  1. Create a new ASP.NET Core MVC project.
  2. Add the Product model and HomeController class.
  3. Place the Index.cshtml view in the Views/Home folder.
  4. Run the application and enter a search term in the search bar. The search results will be displayed in the table below.

This code provides a basic implementation of a search bar in an MVC application. You can customize it further to add more features like pagination, sorting, and advanced search options.

Wireframe

Rich sticky notes

Rich text note

Wireframe for a Typical Online Shop

Note: This is a basic wireframe and can be customized based on specific requirements and design preferences.

Header

Main Content Area

Sidebar

Footer

Additional Considerations:

Example Wireframe:

This wireframe provides a general structure for an online shop. Feel free to customize it based on your specific needs and design preferences.