Decode a Javascript encoded string in C#
November 6, 2009
I had to use the Javascript encode method to escape some data in a hidden control recently. That data was then posted and I wanted a method to be able to convert it back. It turns out that the way to do it is using Uri.UnescapeDataString.
If anyone knows of a better method, or any issues with this approach, please leave a comment.
Open Source CMS
July 15, 2009
Started work on Aardvark, an open source Content Management System, to be written in .NET.
Restoring a backup using SQL
June 24, 2009
This is something I have to do about two times a year and always forget. It’s useful if you are restoring a backup from a development or live server, and the data files are pointing in different places.
RESTORE DATABASE SOME_DB
FROM DISK = 'C:\backups\some_db.bak'
WITH REPLACE,
MOVE 'some_db' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\dsome_db.mdf',
MOVE 'some_db_log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\some_db_log.ldf'