Posts

Showing posts from 2014

HTML5: Mark Element

The <mark> element is used to highlight a text by assigning a background-color attribute Example: This is an example of the <mark style="background-color:yellow;">mark</mark> element This is an example of the mark element

HTML5 : Progress Element

<progress> element represents the progress of a task or goals and objectives, there are two ways that you can set this element, they are the following Determinate - know in advance the starting and ending values Indeterminate - end value is unknown in advance (remove value attribute) Determinate Example: <p>Our goal is to have 500 runners: </p> 0 <progress value=”250” max=”500”></progress> 500 Our goal is to have 500 runners: 0 500 Indeterminate Example: <p>Please wait while we download your TPS Report!</p> <progress></progress> Please wait while we download your TPS Report!

Installing AdventureWorks Sample Databases from Microsoft

Image
1. Type in the following URL into your browser's address bar       http://msftdbprodsamples.codeplex.com/ 2.  Click on the "Download" button on page 3.  Click on the recommended download link 4.  Unizp the file you just downloaded 5.  Open the SQL Server Management Studio, then right click on "Databases" and then select "Restore Database" 6.  Select "Device" under "Source" 7.  Click on the "..." button, and the "Select" backup devices will appear, select "File" for "Backup media type" 8.  Click on the "Add" button, and select the "AdventureWorks2014.bak" file, then click "OK" 8.  Click "OK" on the "Select backup devices" screen 9.  Click "OK" on "Restore Database" window 10.  A message will pop up that says you have successfully restored the AdventureWorks2014 database 11.  The "AdventureWorks2014" database is now

Entity Framework Part 1: Installing Entity Framework 6.1.1 With NuGet

Image
In this blog I will show how to install Entity Framework 6.1.1 with NuGet in Visual Studio 2013 1.  Create a project call "Northwind" 2.  Right click on the solution that the project resides in, then select "Manage NuGet Packages for Solution...." 3.  The "Manage NuGet Packages" window is displayed 4.  In left hand side select "Online", and then select "nuget.org" 5.  In the "Search Online" textbox type in the word "EntityFramework", this will search for the latest version of EntityFramework available 6.  Click on the "Install" button 7.  Select the project you want install EntityFramework to be installed in, then click on "OK" 8. Click "OK" to accept the terms and conditions 9.  When the Entity Framework is installed you will see a check mark next to package 10.  Now you will see the the project has references to the Entity Framework DLLs Blogs in the Entity Framework Series: Installing

Real World Example: The Intranet Application

I am starting a new series in this blog that creates a real world example.  Most web application requires the same things over and over again, and in every organization I worked in there is an intranet application either home grown, or some flavor of a COTS product.  So you can't get anymore real world than that.  I will use the rapid development method, so some background information will not be discussed.  Feel free to do research at the concepts that you don't understand.

SqlDataSource Control Part 5: Write Custom SELECT Statement To Display Category, And Supplier Name

Image
Instead of select the columns on your GridView using the GridView's "Edit Columns" wizard, you can use a custom SELECT statement that you write to display the appropriate columns.  In this blog we will write our own custom SELECT statement to display the category name, and supplier company on our GridView control. To specify a custom SELECT statement perform the following steps: 1.  Click on the ">" icon on the SqlDataSource1 control, then click on the "Configure Data Source" 2.  Click the "Next" button until you reach the "Configure the Select Statement" screen, select the "Specify a custom SQL statement or stored procedure" radio button.  Then click the "Next" button 3. On the "Define Custom Statements or Stored Procedures" screen select the "SELECT" tab, and then type in the following SELECT statement to get the CategoryName field in the Categories table, and the CompanyName field in the

SQL Server 2014 : Creating a Sysadmin Using a Windows 8.1 Account

Image
The one of thing that Windows 8 forces you to do is to sign in with an e-mail account.  I am not here to debate if it's a good thing or a bad thing.  But I just wanted to say, Microsoft why do you make our lives so complicated.  I just wanted Windows 7 with a touchscreen.  I digress :(   Anyways, if you install SQL Server on Windows 8 there is a little quirk that you have to deal with.  When you search for an account to add to your dba user login, you have to search on the entire username including the stuff after the @ sign.  Once again, I digress :( Anyways here is how you add a dba to SQL Server 2014 on a Windows 8 machine. 1.  Connect to your instance of SQL Server, then expand the "Logins" node 2. Right click on "Logins" node, and then select "New Login" 3. Click on the "Search" button 4. Type in the account you want to add in the "Enter the object name to select" text box.  That is my e-mail, feel free to e-mail me.  The only

The DELETE statement conflicted with the REFERENCE constraint "FK_Order_Details_Products". The conflict occurred in database "Northwind", table "dbo.Order Details", column 'ProductID'.

Image
The DELETE statement conflicted with the REFERENCE constraint "FK_Order_Details_Products". The conflict occurred in database "Northwind", table "dbo.Order Details", column 'ProductID'. The statement has been terminated. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_Order_Details_Products". The conflict occurred in database "Northwind", table "dbo.Order Details", column 'ProductID'. The statement has been terminated. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack T

GridView : Enable Pagination, Sorting, Selection

Image
You will notice that when you first create the GridView control all the records are displayed in one page.  You have to scroll just to see all the records.  This can be overwhelming for your users if there are a lot of records.  Also you can not sort or select each record on the GridVidew.  In this tutorial we will enable "Paging", "Sorting", and "Selection" on the GridView 1.  Click on the ">" icon on the GridView 2.  The "GridView Tasks" panel will be displayed 3.  Check the "Enable Paging", "Enable Sorting", and "Enable Selection" checkboxes 4.  Type Ctrl + F5  to run the application to see the changes

SqlDataSource Control Part 3: Enable Pagination, Sorting, Selection

Image
You will notice that when you first create the GridView control all the records are displayed in one page.  You have to scroll just to see all the records.  This can be overwhelming for your users if there are a lot of records.  Also you can not sort or select each record on the GridVidew.  In this tutorial we will enable "Paging", "Sorting", and "Selection" on the GridView 1.  Click on the ">" icon on the GridView 2.  The "GridView Tasks" panel will be displayed 3.  Check the "Enable Paging", "Enable Sorting", and "Enable Selection" checkboxes 4.  Type Ctrl + F5  to run the application to see the changes

GridView : Display Less Columns With "Edit Columns"

Image
Usually when you use the Query Builder feature to build your query you leave the "*" in the select statement.  Th problem with the "*" select statement is that it selects all the columns in the table.  This can sometimes make your GridView very big with all the columns in the table being displayed. In this tutorial we will display only the columns that we want our users to see.  This tutorial assumes that you've created a GridView with the "*" selected on the "Northwind", "Products" table. 1.  Click on the ">" icon on the right hand side of the GridView control, the "GridView Tasks" panel will appear 2.  Click on the "Edit Columns" link 3.  Select the "SupplierID" field in the "Selected fields" list box then click on the "X" button 4.  Select the "CategoryID" field in the "Selected fields" list box then click on the "X" button 5.  Select the