WordPress And SSL

I was having some difficulty migrating my site to SSL and found that this code needed to be added to wp-config.php. This might help.

Read More

Bootstrap Datepickers

Here is a quick code snippet showing how to initiate a Bootstrap date picker control when elements other than the input are clicked.

Read More

Submitting Forms With JQuery May Not Give You The Results You Expect

Be careful how you initiate the form post using javascript. Your form payload may not have all the elements you expect if you use the form.submit() method.

Read More

Yamm For Bootstrap

Yamm for Bootstrap is a Bootstrap menu system that lets you incorporate Bootstrap components into your menus.

Read More

Send Emails Asynchronously

Sending these emails can often be a bottleneck in your workflow and cause the application to stall temporarily whilst the STMP client is instantiated, the email is generated and sent, then confirmation is returned. I will discuss a better way to do this within an MVC application.

Read More

ASP.Net Validators And The DOM

How do you stop ASP.Net Validation controls taking up precious space in the DOM when there are no errors? Don’t create complex classes and overrides. Just tweak the validation control code and some easy CSS.

Read More

Bind Your ASP Controls Together Without Keeping Them Together

Make your ASP.Net controls reference each other without having to bundle them all inside the same container. Simply use the $ sign to separate the Control Ids. See how here.

Read More

IPhone users with IOS9 update – Wifi Assist

Don’t get caught out, people. Check out “Wifi Assist” if you are using an IPhone with the IOS9 update.

Read More

Maximising Screen Real Estate With Textareas

We all want to give our viewers the best experience, so here is a quick CSS solution to an age-old problem of screen clutter.

Read More

Useful CSS Snippets For Your Core Stylesheet

Here are some useful “template” CSS snippets for you to add to your core CSS file. When I say core, I mean a default CSS file that you can port between projects. This file simply does layout, global styles and mixins.

Read More

Bootstrap and Transitions

For those of you who use Twitter Bootstrap at all, you may have come across this problem already. If you haven’t seen this issue, here is an explanation so you know what to expect if it does happen. I found an issue where Bootstrap transitions interfere with my later transitions. Here is a fix to make your transitions stick to your elements.

Read More

String Replacement With Named String Placeholders

The “anonymous” nature of placeholders in the String.Format method can make it confusing. Find out how to use named string placeholders in your code.

Read More

Custom MVC Attributes

The native ASP.Net Membership provider has MVC attributes that we can use to decorate Actions and set permissions. But you may want to extend this security so this article will describe how you can do that.

Read More

Google Search Results Changes

Google have announced changes to the way they will display search results for some websites. For those of us who curate our sites, there are a few things that we should consider.

Read More

Youtube Channel

We are pleased to announce our new Youtube channel. You can find it at YouTube – Web Design With .Net.

Read More

Object Mappers – Merge Objects Together

The idea of mapping objects together is quite simple. It’s like a “merge” the data from 2 objects into one single object. AutoMapper is one tool that helps you achieve this and I will explain some use cases for it.

Read More

Let MVC Concatenate For You

We have all encountered the situation where we want to show user information on a form. Most people have a FirstName and a LastName (unless you’re Prince or Bono). Here is a way to quickly and easily concatenate MVC ViewModel fields without having to use String.Format.

Read More

Uncovering Silent Validation

ASP.Net validation is very useful and allows developers to ensure data is correct before it gets sent to a data store. I would like to explain some best practices and suggestions for you when implementing ASP.Net validation.

Read More

What Is The Deal With C# Operators

There is a large set of C# operators, which are symbols that specify which operations to perform in an expression. Here is a list of operators I frequently use and a brief explanation with code examples.

Read More

Tips For Using Kendo UI Core – Grids

I’ve recently been working with the Kendo UI Core grid and thought I would share some of the things that I did to make my grids flexible and UX friendly.

Read More

New System for Queensland Government – WWD involvement

The Queensland Government’s Department of Communities has a division which handles child safety. Child abuse manifests in many different ways and Departmental staff cannot always intervene to protect children.

Read More

MVC and JSON Action Results for Meaningful Messages

I recently wrote an asynchronous pipeline for my MVC view which displayed a list of users. I wanted to modify each user without a page refresh. This is how I did it.

Read More

Website Update and Rebrand

After many “I should get around to re-branding my site” and “Wouldn’t it be great if I had the time to put into my website”, it’s finally here. I took the opportunity to make the most of some spare time over the Christmas period and freshened the website.

Read More

Easy Do-It-Yourself Captcha

Everyone has seen a Captcha. It is one of those crazy, weird boxes that asks you to type the almost impossible to read words shown on the screen. Here is an idea on how to avoid having one, and still blocking most bots from your site.

Read More

Mindscape Web Workbench Permission Denied on SASS

I came across a problem today while working on a project in Visual Studio. I made a small change to a SASS file and tried to save it. However, Mindscape Web Workbench returned an error telling me there was a problem with permissions. This is how I fixed it.

Read More

RazorPDF – MVC View As A PDF

I have recently been working with a very useful PDF generator tool called RazorPDF. This is available via Nuget and lets developers write familiar XHTML-style code to render model data as PDF.

Read More

CloudFirst Website Launch

We welcomed CloudFirst as a new client only a couple of weeks ago. After specifications discussions, analysis and many late night conversations, we have released a finished business website.

Read More

Brand New Client – CloudFirst

We are pleased to announce that CloudFirst has commissioned WWD to assist with their website re-brand.

Read More

Forms Authentication – How To Handle Simultaneous Users

I’ve seen many different approaches to handling simultaneous users within an ASP.Net application. I don’t see why people try to create it themselves when there is a built-in ASP.Net solution. Let me explain.

Read More

Visual Studio Snippets

You may not know what snippets are in Visual Studio, but I am very confident that you have used them before. Let me explain a way to add custom snippets to Visual Studio which will speed up your development time for menial code blocks.

Read More

C# Transactions

As good developers, we all try to handle exceptions as holistically as possible. I get quite annoyed when I am on a site and some action results in the ugly red ASP.Net error screen. This article talks about handling multiple errors and how to roll them back within a transaction.

Read More

Know How To Use Ternary Operators

This post is following on the series I wrote about initially here – Succinct C# Methods. This post concentrates on Ternary Operators.

Read More

Succinct C# Methods

If you are like me, you are always trying to write your code as efficiently as possible. So, I thought I would start a series of posts that reflect my research on this topic. The first article in this series relates to LINQ and Boolean methods.

Read More

Use Google Fonts Offline

Back in 2013, I talked about using Google Fonts in the article Hosted Custom Fonts. Have a read of that article to get information about using Google Fonts. There are some very good fonts available. However, the default implementation of Google Fonts is to import the fonts from the Google CDN. That’s fine when you […]

Read More

Responsive Design Testing Tools

If you’re serious about responsive web design, you will need to continually test your layout as you work through code. I recently found a great online tool that let’s you do just that.

Read More

Implicitly Typed Variables

I was recently happily coding away and disregarding the green squiggly line that Resharper was trying to force down my throat. NB I am a Resharper advocate, but sometimes I just don’t take notice of the prompts it gives me. Anyway, I decided to check what Resharper was telling me regarding my variable assignment and […]

Read More

MVC Razor Boolean EditorTemplate With Bootstrap Formatting (Updated)

In my post – MVC Razor Boolean Formatting – I talked about using Editor Templates to globally use Bootstrap boolean controls in your MVC application. With the Bootstrap v3 release, that code has become obsolete. So, in the interests of correctness, I thought it necessary to show updated code. @model bool? @{ // make use […]

Read More

Proper Dependency Injection In MVC

An example of dependency injection in MVC

Read More

ASP.Net Tag Description

I came across this post response and thought it would be good to share (and keep for reference). This is quite a good description (with links to MSDN references) of the differences between the various tags used in ASP.NET development. An embedded code block is server code that executes during the page’s render phase. The […]

Read More

ASP.Net Best Practice – Close, Finalize and Dispose

Many developers are not entirely sure about Garbage Collection and think “should I really worry about garbage collection and what it does behind scenes?”. The short answer is Yes – you should worry about garbage collection. Not necessarily because you need to handle it within your application, but because you should have an understanding or […]

Read More

Bootstrap Modals Made Even Easier

Anyone who has used Bootstrap would have probably used modals. A modal is a window that “pops up” as a result of some kind of event on the page. Modals are great for CRUD operations where you want to edit a record in a grid or even to provide some form of response to the […]

Read More

Development and the Dark Visual Studio Theme

I have been using the standard Visual Studio theme ever since I started using the IDE. I have always found it to be visually consistent and usable. However, as the years continue to go by, I have found the standard Visual Studio theme increasingly harder to read. Especially with the larger sized monitors we are using nowadays. So I have started using the “Dark Theme” which seems to be easier to use at lower resolutions.

Read More

Proper Use Of Dash And Hyphen

Did you know there is two kinds of ‘dashes’ in punctuation? The em-dash and the en-dash. The en-dash is the more commonly used symbol. This is probably because it has a dedicated key on the standard English keyboard.

Read More

Roll back Internet Explorer

As progressive developers, we test our code in as many different browsers as possible. Similarly, we may need to ensure our code is backward compatible or we may even have a project that targets a specific version of a browser. The latter is the situation I find myself in my current role and I needed to […]

Read More

T-SQL Tools

For those of us who are “full stack” developers, we often have to deal with other people’s code. This can mean that we get code that is poorly formatted or has lost formatting due to an export or some other reason. Here are some tools that may help you out.

Read More

Show A Loading Indicator For Long Running Processes

We have all been on a page where the command we started is taking waaaaaaay longer than we expected. This is the eternal conundrum. Do I stop the page loading or wait? In my opinion, users should never be confronted with this problem. As developers, we should try to give as much feedback as possible. […]

Read More

JSON Action Results and Internet Explorer

I had an issue recently where my MVC action was returning some JSON as a result. The issue occurred when Internet Explorer (possibly only earlier versions) got the JSON response, it thought the response should be delivered to the browser. This is quite undesirable.

Read More

JQuery WYSIWYG Editor

Just a quick post to point you towards a JQuery WYSIWYG editor I came across recently.

Read More

JQuery JSON parse error – “Uncaught SyntaxError Unexpected Token u”

I was working on a bootstrap modal that posted the form via AJAX. On submit, I checked for the success/failure of the form post, then (if successful) hide the modal. Otherwise, leave the modal and display an error Toastr message. But I had this JQuery error that I couldn’t quite trap and it was driving […]

Read More

Handling Checkbox Groups in MVC4

I recently had some work that required a series of checkboxes to be displayed in a view that relate to permissions for a user. The use case was that a user could be a member of one or many groups and those groups determined the level of access within the system. The view needs to […]

Read More

Deploy MVC Applications to IIS

Sometimes, we are fortunate enough to work with a large team which means we all have parts to play. As a developer, that part would often be to cut as much code as possible and keep the project on track. In this situation, deployment may not be something to worry about. Conversely, on smaller teams […]

Read More

MVC, DropDownLists and ViewModels

There are a number of resources out there that describe how to do DropdownLists in MVC. In my opinion, none of them gave me stable, re-usable code that I could implement. This is the way that I do dropdownlists so hopefully it will help some of you. At its essence, I have a ViewModel that […]

Read More

Responsive KendoUI Grids

For those of you who use Telerik’s KendoUI grids, you would know that the grids have a heavy focus on javascript. In fact, a large proportion of grid configuration results in client-side changes.

Read More

LINQ to Entities – Query Types

I have been doing a lot of work in MVC lately. Specifically, working with a WCF backend service which serves up data for the MVC UI layer. The layers are quite structured but the base layer of the entire application is the Data Project. This project is a series of repository classes and related interface […]

Read More

MVC Checkbox and Bootstrap

Bootstrap v3 has some very nice implementations of boolean selectors. You can read the documentation here – http://getbootstrap.com/javascript/#buttons. I have modified the default functionality to incorporate some formatting. More importantly, I have a small block of javascript that will make MVC integration much easier. It’s also generic enough to have in a global javascript file […]

Read More

MVC Razor Boolean EditorTemplate With Bootstrap Formatting

EDITOR NOTE: This approach is obsolete since the release of Bootstrap v3. See this post for more details. The bootstrap btn-group “toggle” functionality is quite nice and very intuitive. Here is an EditorTemplate for MVC that will format all boolean model fields as Bootstrap button groups.

Read More

Image Placeholders – Save Time Creating Sample Images

I recently stumbled across a great resource relating to images. We’ve all been in the situation where we need to mock up a page quickly. To make the page appear more realistic, it really should have some neatly aligned and floated images or different shapes and sizes. Until now, I would jump into Paint.Net and mock up some images of the required sizes, save them, import them into the project and reference them in the code. http://placehold.it will change all that.

Read More

GitHub Account and New Repository

I have had a GitHub account for some time but have never really done anything with it. That changed today.

Read More

ASP.NET MVC 3 Layouts with Razor

As a developer coming from a webforms background, I am continuing my understanding of MVC. A major part of the MVC framework is Razor which is the syntax used within views (Scott Guthrie has a good explanation here). Two components of razor are Layouts and Sections and I will explain these a little further.

Read More

Get The Most Out Of QR Codes

You would have all seen a QR code. They are the barcode looking squares that are on tickets, magazines and even store fronts. Advertisers use them to take a customer to a website, but they can be used for so much more than that.

Read More

Webtrieve – Initial Discovery

Welcome to the Webtrieve project series. If you want more details about this series, jump over to this post and get the background. This post will describe the initial preparation and discovery for the Business Analysis from specification through to Product Manager sign-off. This project is the re-development of an existing application so a lot […]

Read More

Webtrieve – Setting The Scene

I am starting a new series of posts about a project that I am working through. This project is the re-development of an existing web application. The application is called Webtrieve and it is a customer portal where users can view information that is secured according to their userid. The current application is quite dated […]

Read More

Doing Responsive Tables

Not that many years ago, we were using tables for layout in our designs. This was the best option we had for forcing elements to be in specific positions on the page. Of course, now we wouldn’t dream of using tables for layout in our designs. Tables are terrible and we chastise ourselves for even thinking they were good … right?

Read More

Create Your Own Favicon

Have you noticed how some websites have a picture in the tab in your browser? This picture is called a favicon. Like most other words that began on the internet, this is two words smashed together – favourite and icon It’s not black magic, it’s actually quite easy to create your own favicon. Just put […]

Read More

Rich Text Fields in Forms

For a long time, I struggled to find a good rich text capable textbox for use in my bespoke development projects. Previously, I have looked at NicEdit and FreeTextBox and these work OK. However, I found that they often put padding or extra elements in my content which then could affect the layout when I bring the content back to the screen on a view page. Since doing a lot of work with Bootstrap, I have found a great client-side rich text script that works a treat.

Read More

Consumers Beware – Who Has Your Personal Details?

I have a friend who recently found herself the victim of identity theft. The scenario is that she got an email from PayPal confirming the purchase she made of some Chinese language software. And she doesn’t even speak Chinese!

Read More

SASS Mixins

I have only just recently “dipped my toes” into what I thought was the cold water of the CSS pre-processor pool. But, to my surprise, I have found SASS to be a time-saving and intriguing tool. I thought I would share a mixin that I found on Pluralsight and used to create my own. The […]

Read More

Crazy Domains – Breach of Registrar Agreement

Any fellow Crazy Domains customers might find the below article interesting. From the way I read it, the impact on customers will be if you have already lodged tax invoices prior to receiving amended tax invoices recently. The auDA (.au Domain Administration) believe that Crazy Domains have been in breach of their registrar agreement by distributing incorrect tax invoices.

Read More

New Client Work: Shopping Cart Requirement

I have mentioned a client who I helped get her clinical practice on the internet. She has some great ideas on how to market her business and she is working hard. Recently, we had a discussion about a book that she is writing. She wants to sell the book online (through her site), so we had to come up with a way to make this happen.

Read More

XMind – Mind Mapping Tool

Part of good web design is working with good tools and knowing how to use them. My mind mapping tool of choice is XMind. It’s an Open Source project and has most of the features of a paid product like Mind Manager, but it’s free.

Read More

JQuery Selectors and Wildcards

There are times when a series of elements are on the page that have the same first few characters in an attribute, but the entire attribute cannot be used as a selector. For example, a grid that has checkboxes in the 10 rows. Each row’s checkbox has an ID attribute of chkbox* where the star […]

Read More

Web Deployment and Config Transformations

If you are developing locally, you probably have a local testing environment. If you don’t, you really need to investigate this and look to get an environment for testing (but that is content for another post). I recently became aware of configuration file transformations to match the environment you are deploying to. Essentially, you can […]

Read More

Where is my SQL Server Intellisense?

A really quick post here. I had problems with my intellisense and wanted to share with you all.

Read More

Lazy loading images

I recently found this JQuery plugin that saved my life. I was authoring a Help page that had lots of images in it. Total page load was 5.6Mb. I had ideas on how to deal with this by hiding content and creating a table of contents that loaded content when it was requested. It was probably going to take some time to put together though. Then I found this plugin.

Read More

Creating a Gridview and Formview Master/Child page

For those of you who don’t know what CRUD stands for, it is Create, Read, Update, Delete. These are the four main “modes” we need for data entry and should be the most basic of operations we code for in our applications.

Read More

Add a “Figure:” label to your Images

We all love documentation, right? I know I would rather be coding or cutting up some images and getting my hands dirty than actually documenting how I did something. It is necessary though, so wouldn’t be it great if we had some script help to format our documentation.

Read More

Caption your JQuery Sliders

I recently had a client who wanted a rating scale control on their site. The perfect choice was the JQuery Slider control. I found this very useful, however I was surprised to realise that it does not support value captions. That is, display some kind of indicator to show the selected value of the slider […]

Read More

Hosted Custom Fonts

We all love working with design agencies because they are the creative folk who love colours and layouts and fonts. Historically, if we were given one of their non-Windows/Mac fonts, we needed to install the font on our system, create an image using that font and then code some image replacement in the layout. Then the client wanted a different background colour on that image so we need to make that change and iterate again. Also, images use bandwidth and we like to keep our sites as lean as possible. Phew, I’m tired just thinking about it!

Read More

Classes, Inline Styles and HTML Elements

It’s !important (hehe) to know how your styles are being applied to the DOM.

Read More

asp:GridView Row Selection Ideas

GridViews are great for showing tabular, repeated data. As with all tabular data, sometimes your dataset has too many fields to show within the table. Therefore, you need to make the row “clickable” so you can show the further detail to the user. You may post the record ID to a view page or even […]

Read More

Passing Server-side Data using Javascript

Let’s say we have a list of items that we need to pass on to another page. This list is called an Array. This might be a list of selected groceries (eg apples, oranges, milk, bread) and we want to pass this list to a checkout page. One way we could have got this list is cycle through a grid and add selected items to the array. However we did it, we have a javascript array called groceries with a number of items in it, like this.

Read More

JSON – using the basics

Hi again. This article is a follow on from another that I wrote about the basics of JSON. If you are new to JSON, I suggest you give this article a good read first. It gives some basics on JSON format and some descriptive examples. Be sure to come back though and we will get […]

Read More

JSON – setting the scene

I know, I might be late the party, but at least I came. I’d like to share with you some realisations I’ve recently had regarding JSON. This came about because I have been doing quite a bit of mobile development lately. Not iOS development, but with JQuery Mobile. I’ll shout the praises of JQM in […]

Read More

Designing and Catering for Javascript

As progressive developers, we need to be mindful of the huge audience that the internet presents. There is a plethory or browsers, operating systems, devices, screen resolutions and technology. One item of technology that we sometimes “take for granted” is Javascript.

Read More

JQuery and Ajax – asynchronous data load

Here are a few ways to get data asynchronously using JQuery and Ajax.

Read More

TFS and Visual Studio

For all us Visual Studio users, here is something to keep in mind. I recently found a problem when trying to “get latest” from TFS for my C# project. The message I was getting was “Project c:\XXXX\YYY\ZZZZ.csproj, which you are getting from the source control store, already exists. Would you like to overwrite it with the store version, or leave your local copy?”. I found that Visual Studio keeps temp files that it uses to record some design-time settings and other information of web application projects. It stores this content in your user profile.

Read More

Give yourself a local domain name

Sometimes, the good ol’ http://localhost web address isn’t enough for local development. In fact, if you are hosting or developing multiple sites, a single web site can be down right limiting. Windows 7 lets you create multiple web sites which alleviates this and lets you create sites for specific projects. A further extension of this is to apply host headers to your local machine sites and then you can reference them however you like.

Read More

Get SSRS Report Parameters through the Database

Here is a quick snippet for all those SSRS developers.

Read More

Tools of the Trade

Here is a fluid, ever-growing list of the tools that I use in Web Design and Development. If you have any questions, feel free to leave a comment.

Read More

Conditional Databinding

ASP.NET data presentation controls, like GridView, Repeater, DataList, ListView, DetailsView or FormView, could be used to show data from database fast and easy, even without single line of ASP.NET server side code. But, sometimes raw data from database are not suitable for showing on web form directly. You could need additional formatting for date values, handle NULLs, change 0 and 1 to something more intuitive to your visitors, show warning if value is too high or just change styles like background color.

Read More

Reporting Services – passing parameters in the URL

Reporting Services (SSRS) has many wide and varied uses and is becoming more and more popular as a nice clean reporting solution. An SSRS report allows you to filter searches based on the parameters that you configure at design-time. Each of these parameters can have default values that the report will use each time it executes.

Read More

Global.asax Events and Debugging

This is something I came across recently when trying to debug some events that were executed in Global.asax. I was updating a database at Application_Startup but it didn’t seem to be firing. I was running in Visual Studio locally on my laptop, I repeatedly executed my application in debug mode and waited for the database update to fire. I even tried SQL Profiler to detect when the database was being updated. But no data was being written to my database. Straaaange!

Read More

Pesky LI Navigation links when using Master Pages

I’ve been working through a problem that has been bugging me for a while now. But I’e just never had the time to work out a solution.

Read More

Javascript Best Practices – Reading

Here are some not-so-well-known Javascript best practice ideas

Read More

Using HTML 4 Concepts to Justify Nav Items

Using ‘text-align: justify’ to make navigation item equidistant. Brilliant!

Read More

Database Connection in Codebehind

I’ve been asked a few times to explain how to connect to a database using code, instead of just using SQLDataSource in Design view. This article explains how to connect to a database and by passing parameters to a Stored Procedure which returns a result set.

Read More

Client-side Form Validation

Every form needs to be validated in one way or another. The most basic form of validation is check that all required fields have been given values. Here is a script that should help with that.

Read More

Gridview Selection with Checkboxes

We all use Gridview controls to show tabular data. That’s what they are designed to do. But what if you want to just display a table of data and allow the user to select one (or many) rows so that the system can associate those rows with something else.

Read More

Select All Checkboxes

Everyone works with grids. A lot of times, these grids have checkboxes to allow the user to perform an action on multiple items in the grid. Here is a quick overview of handling checkboxes in a grid situation.

Read More

Media Queries and Enquire.js

Enquire.js is a javascript library that lets you execute scripts at specific media query breakpoints. Not only does this library let you “match” breakpoints and execute code, but it also lets you run script based on “unmatching” breakpoints.

Read More