Geeks With Blogs
Sharvan Dhaka blog
This is code of to create vcf card on the fly
 
//sdBuild is string builder

sdBuild.Append("N:" + strCn + System.Environment.NewLine);
sdBuild.Append("FN:" + strCn +System.Environment.NewLine);
//// encoding to base 64
certString64 = certString64 + System.Environment.NewLine + "KEY;X509;ENCODING=BASE64:" + System.Environment.NewLine;
certString64 = certString64 + Convert.ToBase64String((byte[])valuess) + System.Environment.NewLine;
//// encoding to base 64 ends here
sdBuild.Append(certString64);

sdBuild.Append(System.Environment.NewLine+"ORG: None;"+System.Environment.NewLine);
sdBuild.Append("TITLE:" + strTitle +System.Environment.NewLine);
sdBuild.Append("NOTE;ENCODING=QUOTED-PRINTABLE:This is a note associated with this"+System.Environment.NewLine);
sdBuild.Append("contact=0D=0A"+System.Environment.NewLine);
sdBuild.Append("TEL;WORK;VOICE:"+System.Environment.NewLine);
sdBuild.Append("TEL;HOME;VOICE:" + strHomePh +System.Environment.NewLine);
sdBuild.Append("TEL;CELL;VOICE:" + strMobile +System.Environment.NewLine);
sdBuild.Append("TEL;WORK;"+System.Environment.NewLine);
sdBuild.Append("ADR;WORK:;;" + strState + ";" + strCo +System.Environment.NewLine);
sdBuild.Append("LABEL;WORK;ENCODING=QUOTED-PRINTABLE:" + strCo +System.Environment.NewLine);
sdBuild.Append("751234 =0D=0AUnited States of America" +System.Environment.NewLine);
sdBuild.Append("URL:"+System.Environment.NewLine);
sdBuild.Append("URL:"+System.Environment.NewLine);
sdBuild.Append("EMAIL;PREF;INTERNET:" + streMail +System.Environment.NewLine);
sdBuild.Append("REV:"+System.Environment.NewLine);
sdBuild.Append("END:VCARD");
Posted on Sunday, October 15, 2006 5:55 PM Asp.net , c# , Tricky Solution/ Code | Back to top


Comments on this post: Create .VCF File(outlook contact file) with C#

# re: Create .VCF File(outlook contact file) with C#
Requesting Gravatar...
I had a problem

I m trying this code but

in .vcf file unicode character insted of (รถ)
? print...

please tell me the problem .
Left by gaurav on Sep 09, 2010 8:56 AM

Your comment:
 (will show your gravatar)


Copyright © Sharvan Dhaka | Powered by: GeeksWithBlogs.net