public VCardResultHelper(VCardViewModel card) { _card = card; }
public ActionResult ExportToVCardOnClick(int id) { ////Export To vCard //MemoryStream output = new MemoryStream(); //StreamWriter writer = new StreamWriter(output, Encoding.UTF8); //writer.Write("BEGIN:VCARD"); //writer.Write("VERSION:2.1"); //writer.Write("N:" + "Rasel" + ";" + "Bappi"); //writer.Write("FN:" + "Md. Toffazal Hossain"); //writer.Write("EMAIL;PREF;INTERNET:" + "*****@*****.**"); //writer.WriteLine(); //writer.Write("END:VCARD"); //writer.Flush(); //output.Position = 0; //File(output, "text/x-vcard", "raselbappi.vcf"); //return Json(Boolean.TrueString); var card = new VCardViewModel { FirstName = "FirstName", LastName = "LastName", StreetAddress = "StreetAddress", City = "City", CountryName = "CountryName", Mobile = "Mobile", Phone = "Phone", Email = "Email", }; var models = card; string title = "card"; Session[title] = models; return Json(Boolean.TrueString, JsonRequestBehavior.AllowGet); }