Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
i need code for sending the backup of database.mdf on some mail_id like abc@abc.com.
i need to write a code on click of a single button.

thanks in advance.
Posted
Updated 21-Dec-11 8:47am
v2
Comments
Orcun Iyigun 21-Dec-11 14:43pm    
I need your code as well? What have you tried?
#realJSOP 21-Dec-11 14:46pm    
Nothing - obviously...

If this is SQL Server, the basic principle could be like:


  • when issuing the backup define a proper place for the backup file

  • execute the backup command for example using SqlCommand[^]



Note: If your database is big you will most likely have trouble in sending it or the recipient may have trouble in receiving it.
 
Share this answer
 
Comments
RaviRanjanKr 21-Dec-11 15:54pm    
My 5+
Wendelius 21-Dec-11 15:56pm    
Thank you :)
Google reveals all. Here's a CodeProject article on sending email:

Sending Mail Using C# via SMTP[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900