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.
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.
Here is a quick code snippet showing how to initiate a Bootstrap date picker control when elements other than the input are clicked.
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.
Yamm for Bootstrap is a Bootstrap menu system that lets you incorporate Bootstrap components into your menus.
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.
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.
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.
Don’t get caught out, people. Check out “Wifi Assist” if you are using an IPhone with the IOS9 update.
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.
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.
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.
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.
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.
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.
We are pleased to announce our new Youtube channel. You can find it at YouTube – Web Design With .Net.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
We are pleased to announce that CloudFirst has commissioned WWD to assist with their website re-brand.
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.
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.
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.
This post is following on the series I wrote about initially here – Succinct C# Methods. This post concentrates on Ternary Operators.
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.
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 […]
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.
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 […]
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 […]
An example of dependency injection in MVC
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 […]
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 […]
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 […]
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.
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.
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 […]
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.
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. […]
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.
Just a quick post to point you towards a JQuery WYSIWYG editor I came across recently.
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 […]
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 […]
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 […]
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 […]
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.
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 […]
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 […]
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.
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.
I have had a GitHub account for some time but have never really done anything with it. That changed today.
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.
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.
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 […]
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 […]
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?
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 […]
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.
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!
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 […]
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.
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.
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.
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 […]
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 […]
A really quick post here. I had problems with my intellisense and wanted to share with you all.
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.
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.
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.
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 […]
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!
It’s !important (hehe) to know how your styles are being applied to the DOM.
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 […]
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.
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 […]
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 […]
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.
Here are a few ways to get data asynchronously using JQuery and Ajax.
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.
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.
Here is a quick snippet for all those SSRS developers.
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.
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.
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.
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!
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.
Here are some not-so-well-known Javascript best practice ideas
Using ‘text-align: justify’ to make navigation item equidistant. Brilliant!
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.
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.
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.
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.
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.