Add watermark to textbox and password textbox using HTML5

If you need to add a watermark on your textboxes and wish to avoid ugly Javascript implementations, HTML5 is your friend. Simply use the placeholder attribute with any input element of type text or password, as per the examples below: <input id=”txtUsername” type=”text” placeholder=”Type your username” /> <input id=”txtPassword” type=”password” placeholder”Type your password” /></pre> This works like a treat! P.S This feature is only supported by the latest HTML5 browsers (IE10, Safari, Chrome, Firefox). Older browsers still require Javascript Happy coding… …[read more]


Resolving RDLC error: “The report definition is not valid” in Visual Studio 2012

I recently inherited a large number of Microsoft RDLC reports where I had to fix a number of issues before the upcoming release. One of my first tasks was to write a quick “RDLC runner” console application to allow me to test the reports locally. You can download the RDLC Runner from NuGet here. Or run the following command on the NuGet Command window in Visual Studio: The RDLC Runner is a very simple .NET 4.5 project. It takes two XML input files (parameters and data), the path to the .rdlc file and the name of the output file. …[read more]


Removing the dbo_ prefix from imported tables in MS Access

When importing data from SQL Server using the ODBC connector in MS Access, your tables will end up prefixed with their corresponding schema. In most cases this will be the "dbo" schema. If you need to remove the prefix, these are the steps you need to follow: Open your MS Access file (mdb or accdb) If you are presented with a Security Warning, enable execution of secure content Navigate to Database Tools and from the top left corner press the Visual Basic button This opens a new window Add a new module Replace everything in this module with …[read more]


Deleting all data from an MS Access database

If you need to empty/truncate all user data from an MS Access database, the following VB script should do the job: Public Sub TruncateTables() On Error GoTo Error_TruncateTables Dim DB As DAO.Database Dim TDF As DAO.TableDef Dim strSQL_DELETE As String Set DB = CurrentDb() For Each TDF In DB.TableDefs If Left(TDF.Name, 4) &lt;&gt; "MSys" Then If Left(TDF.Name, 1) &lt;&gt; "~" Then strSQL_DELETE = "DELETE FROM " &amp; TDF.Name &amp; ";" DB.Execute strSQL_DELETE End If End …[read more]


Windows Azure Review

Windows Azure has been a godsend for developers. I have been using Windows Azure over the past few weeks and I have to say that the overall experience is amazing. I've used Amazon's Web Services in the past and one thing that always marred the experience was the convoluted and often confusing website. What Windows Azure has achieved is miles better than any other cloud service I've tried before and I explain why below. Overall Experience The site was redesigned from the ground up and it is now using HTML 5 which is a big departure from the old Silverlight-based …[read more]


Accessing local data files using Html and Chrome

During the development and testing stages of a new website, there are time when you may need to access Json or xml data stored in a local file. The test site can be running under Visual Studio, IIS Express or even IIS. I recently had to quickly test some javascript code that interacted with Json data. I was trying to debug using Chrome's Developers tools but I was getting an error at every execution. The method was doing nothing more than this: $.getJSON('file:///C:/Temp/testdata.json' By default, Chrome does not allow javascript  to interact with local file …[read more]


Fixing virtual disk errors in VMware

As a developer, I tend to use VMs extensively to test new features and deploy software that I wouldn’t like running on my main machine. VMware is brilliant in that it offers a free tool to create and run VMs - VMware Player. As handy and great VMs are, they are also quite volatile and tend to break or get corrupt easily. If your host machine restarts unexpectedly or if the VM is not shut down properly etc. you  may then experience issues the next time you try to restart. Below I have described how to resolve 3 of …[read more]


Configuring multiple websites in IIS on a Windows Azure Virtual Machine using EndPoints

Windows Azure is a great environment for developers and companies alike due to the fact that it gives so much for so little. Apart from the 10 free websites, you get a free* Virtual Machine and a large number of other services like storage, SQL Server etc. I’m currently using the VM option to deploy and test a number of client websites without the need to use the client’s servers. Instead, I use the VM as my staging-demo environment and once all the testing is complete and the client is happy, I then deploy to the live environment. …[read more]