Simple MVC and Razor with Database Connection for Simple Insert, Update and Delete.

Model View Controller

If you are new in MVC (Model View Controller) then this tutorial is the ideal for you. I had issues in finding one single tutorial with all my questions so I decided to put one together myself. This tutorial might seem long however, most of the tutorials is full of images to help you visualize better so in order words, it is not as long as it might look like on your scroll bar ūüėČ Goodluck and hope you find no issues… if you do, feel free to leave a comment and I will be glad to help where possible.

Continue reading

Error: entitytype entity type has no key defined


No Primary Key is defined. Visual Studio generally looks out for an entityproperty int ID or similar and set it as a primary key. However, if our primary key is something like “Username” then we need to specify which one it is.



Include the namespace:

using System.ComponentModel.DataAnnotations;

Before your Primary Key add the following attribute:



background-postion middle not working


background-position: center middle;

I once encountered an issue when aligning my background to the center of the page both vertically and horizontally.


So lets start by explaining how to use background-position. Background-position takes two values, a horizontal value and a vertical value as demonstrated below:

Cause and Solution:

Now, the issue rises when using middle for the vertical alignment which is the second value of the background-position. A simple fix for this would be to use 50% which is excepted for both horizontal and vertical values.

background-position: left 50%;        //background would start from the left side of the page, and vertically centered within the page.

background-position: center 50%;     //background would be aligned in the center of the page  //here we could also use 50% rather than center.

View website in 3D using FireFox

Firefox 3D view

Firefox has a very usefull tool when working with layers. It allows you to view a website layer by layer in order of display. I found it most usefull when setting z-index in style sheets to set which elements go on top and which go under. This is quite an easy tool to use. Here I will show you a quick example on how to make full use of it. First visit to follow each step. Make sure to use Firefox as a browser.

Continue reading

Internet Explorer Image Link Borders

Does Internet Explorer image link’s border annoy anyone else from me???

Well, here is a short quick way to avoid having any borders to image links.  In your HTML page or in your CSS file add:

HTML page in your Head section: <style>body{  a img: 0; } </style>

CSS file beginning of file: body{  a img: 0; }

Create your Website this February to Benefit from exclusive Offers!!!

During the Month of February, Twiggle Web Design is offering special prices on web development for new and existing businesses or pages. Prior to commitment, they are also offering FREE online advice and consultancy to help lead the client to the right product. Various offers are available for website starting from basic 2 pages site to complex sites with customised CMS (content management system) to allow the user to manage own personal website.


Below is a reference taken from their website:

“This February, Twiggle Web Design is offering a promotional package including an entire free website design, free consultancy on functional requirements, along with a free structural design. For the first year, hosting is free of charge and a free domain is provided as required by the client. This special package requires the purchase of a full customised CMS which would also be discounted by 25%.¬†

Twiggle Web Design, is also offering a second Promotional Package intended for smaller businesses or clients. This package includes a Free Website Design and Free Hosting when purchasing a static Website of 2 pages or more. Free Logo Design will also be included with design for fresh businesses. This promotional package is ideal for small or new businesses, personal pages and temporary promotional pages. 

All of the above can be yours till the end of February. Contact Us for more information and to benefit from our Promotional Packages this February! 

Happy Valentine’s !”

For more information visit:

Or contact directly on: