Database backup is a part of Maintenance not part of programming
so go to Maintenance Plan
feature of SQL server Management Studio.
How to: Create a Maintenance Plan, use :http://msdn.microsoft.com/en-us/library/ms189953(v=sql.105).aspx
If you are using Express Editon (thus no SQL Server Agent is available for Maintenance Plan) see script given by ; http://ola.hallengren.com/
] , Here free script is given.