TechieTogs on GitHub
Anyone who has witnessed my mad, sleep-deprived ramblings on Twitter over the last few months will probably already know that I have written a WebMatrix book: Building ASP.NET Web Pages with Microsoft WebMatrix
Three chapters of the book contain a tutorial where the reader builds a complete ecommerce app, TechieTogs, from start to finish. TechieTogs is a fully-featured ecommerce app built using ASP.NET WebPages and Microsoft WebMatrix. The site features all of the elements you would usually expect to find on a shopping site, such as a catalog, shopping cart, and checkout. The product catalog is managed using a series of pages that are only accessible to site administrators.
The guys at Apress have agreed that I can make the sample app available on GitHub for anyone who wants to have a mess around with it. The repository contains all the files you need to run the app. Simply download the ZIP file, extract it to a suitable place and open in WebMatrix to run.
https://github.com/stevelydford/TechieTogs
Have fun with it and let me know if you find it useful.













Sid Conner 7:48 am on January 18, 2012 Permalink
Thanks for sharing this steve!
Steve Lydford 7:10 pm on January 24, 2012 Permalink
You are welcome! I hope you find it useful.
Gus 10:36 am on January 26, 2012 Permalink
Hello Steve I have purchased your book and it is awesome , I have no experience in coding yet I can slowly grasp the code and move things around where I want them to be!! Here is my question , I want the categories also to have an image that relates to them…
I have added this to the Edit Category Page
@Html.Label(“Category Image:”, “categoryImage”)
then after reviewing the productImage code… I am completely lost on how to program so that i can upload the image and it relate to the category!!! Can you please help me??
Steve Lydford 11:27 am on January 26, 2012 Permalink
Hi Gus, so glad you are enjoying the book. Rather than try and explain everything here, I’ll put together a blog post to show how to add this feature to TechieTogs. I’ll try and get it up in the next couple of days. Watch this space.
It’s great that you are digging through the code and making changes. It is, without a doubt, the best way to learn!
Gus 4:35 pm on January 27, 2012 Permalink
Thank you very much Steve!!!
Gus 2:05 am on February 8, 2012 Permalink
Hello steve while i am going back and forth in your book a question arose I was trying to use Html.DropDownList read from the TechieTogs database
I setup a Options table which has optionId optionTitle
optionId 1 optionTitle = Red
optionId 2 optionTitle = Blue
optionId 3 optionTitle = Green
how do i make a dropdownlist helper read those options?? and present it to the user in dropdown form in razor??
Gus 6:26 am on February 8, 2012 Permalink
I must be annonying but here goes again
‘
I got an example
var sql = “SELECT ProductId, ProductName FROM Products”;
var data = Database.Open(“Northwind”).Query(sql);
@foreach(var row in data){
@row.ProductName
}
but your productdetails.cshtml has this
@{
Layout = “~/Shared/Layouts/_Layout.cshtml”;
var productID = !UrlData[0].IsEmpty() ? UrlData[0] : “0″;
var db = Database.Open(“TechieTogsData”);
var sqlSelect = “SELECT * FROM Products WHERE productID = @0″;
var product = db.QuerySingle(sqlSelect, productID);
}
how in the world do i change it?? so it can get fix..
awadesh 3:08 pm on February 9, 2012 Permalink
thanks
manos 11:33 am on March 9, 2013 Permalink
Hello,
I try to run your app and my problem is that when I add product with decimal points into the cart I get 0 as value, if I modify the price to round value eveything is OK
Any idea what to do to correct this
Thanks, Manos
manos 11:55 am on March 9, 2013 Permalink
I found a solution ny adding to web.config file
If you have something else please reply
Macdonald 3:33 pm on May 6, 2013 Permalink
Am relative new into asp.net web pages and i have being following your work on the eCommerce app TechieTogs. suppose i have large quantity of product to display on the product page, how do i add pagination to the product page?