Creating a custom user login form with .NET C# MVC 4 Razor Introduction Majority of web projects needs handling users and therefore user login section. In this article I'm writing about how quickly create user login, logout functionality and display that status. This article is not related to any specific database so you can use whatever you need, e.g. MSSQL, PostgreSQL, MySQL etc... In this case I'm showing example with MSSQL. Steps to reach the goal Step 1. Creating a project. In those screenshots I'm creating MVC4 project, but this tutorial should work on MVC3 too. Then select that you are using Razor engine. Check create Tests if you are planning to use it later in your project. If not - leave it unchecked. Step 2. Creating a database Right click on App_Data -> Add -> New item... ->Data -> SQL Server Database -> OK. Now we need a users table. Right click on Tables and open New Query window. Now paste co...
Posts
- Get link
- X
- Other Apps
By
Wajid Javed
-
Puzzle Game in c# Description This is a simple game written in C# in which user presses Up, Down, Left, Right arrow keys to play this game. The objective of this game is to arrange 1 to 15 numbers in ascending order where the numbers in grid are in random. User will have 10 minutes of time to complete this game. If user wins the game he gets displayed in how many moves he completed the game Step By Step Step 1: Generating random values & Creating Labels on the form. public void createlabels() { int i = 0; int val; for (int j = 0; j < ROW_COUNT; j++) for (int k = 0; k < COLUMN_COUNT; k++) { val = gridVal[j, k]; label[i] = new Label(); label[i].Font = new Font("Microsoft Sans Serif", 15F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0))); label[i].Width = 60; label[i].Height = 60; label[i].Left = k ...
Cappilary
- Get link
- X
- Other Apps
By
Wajid Javed
-
The rise or fall Of a liquid in a capillary tube is related to the surface tension of a liquid whether a liquid rise in a capillary like water or depressed like mercury. It depends on the relative magnitude of cohesive and adhesive forces.These forces determine the contact angle which the liquid make with the walls Of the tube. If the contact angle is less than 90° it is said to wet surface and concave miniscus is Formed. If contact angle is Greater than 90° the liquid doesn't wet the surface and convex miniscus is formed. The formation of concave miniscus by a liquid that wet the glass leads to the capillary rise whereas the formation of convex miniscus leads to the depression in the liquid and shows Capillary Fall.
SQL: ALTER TABLE STATEMENT
- Get link
- X
- Other Apps
By
Wajid Javed
-
This SQL tutorial explains how to use the SQL ALTER TABLE statement to add a column, modify a column, drop a column, rename a column or rename a table (with lots of clear, concise examples). We've also added some practice exercises that you can try for yourself. DESCRIPTION The SQL ALTER TABLE statement is used to add, modify, or drop/delete columns in a table. The SQL ALTER TABLE statement is also used to rename a table. ADD COLUMN IN TABLE Syntax To add a column in a table, the SQL ALTER TABLE syntax is: ALTER TABLE table_name ADD column_name column-definition; Example Let's look at a SQL ALTER TABLE example that adds a column. For example: ALTER TABLE supplier ADD supplier_name varchar2(50); This SQL ALTER TABLE example will add a column called supplier_name to the supplier table. ADD MULTIPLE COLUMNS IN TABLE Syntax To add multiple columns to an existing table, the SQL ALTER TABLE syntax is: ALTER TABLE table_name ADD (column_1 c...
SQL CREATE TABLE Statement
- Get link
- X
- Other Apps
By
Wajid Javed
-
The SQL CREATE TABLE Statement The CREATE TABLE statement is used to create a table in a database. Tables are organized into rows and columns; and each table must have a name. SQL CREATE TABLE Syntax CREATE TABLE table_name ( column_name1 data_type ( size ), column_name2 data_type ( size ), column_name3 data_type ( size ), .... ); The column_name parameters specify the names of the columns of the table. The data_type parameter specifies what type of data the column can hold (e.g. varchar, integer, decimal, date, etc.). The size parameter specifies the maximum length of the column of the table. Example CREATE TABLE Persons ( PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) );
Applications of a Queue in Daily life
- Get link
- X
- Other Apps
By
Wajid Javed
-
Definition of Queue A Queue is "an abstract data type in which elements are added to the rear and removed from the front; a 'first in, first out' (FIFO) structure." ( C++ Plus Data Structures , page 226) The main difference between a queue and a stack is that elements in a queue are put on the bottom and taken off the top (remember, in a stack, elements put on the top and taken off the top). For an everyday queue example, consider a line of customers at a bank waiting to be served. Each new customer gets in line at the rear. When the teller is ready to help a new customer, the customer at the front of the line is served. This is a queue--the first customer in line is the first one served. 1.1 Applications of a Queue In general, queues are often used as "waiting lines". Here are a few examples of where queues would be used: In operating systems, for controlling access to shared system resources such as printers, files, communication lines, disks and tapes.A ...