Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Osman Coskun 152 posts 355 karma points
    Dec 05, 2019 @ 11:53
    Osman Coskun

    Generate vCard From Content Node


    I want to generate downloadable vCard generated from information in staff profile content. I found that defines the process.

    I'm not a .Net ninja and couldn't find how to apply similar code using surface controllers in Umbraco.

    Can anyone guide me?

    Thanks in advance...

  • Alex Skrypnyk 6051 posts 23205 karma points MVP 5x admin c-trib
    Dec 15, 2019 @ 23:27
    Alex Skrypnyk

    Hi Osman

    Did you solve this issue? Can you share with our community how did you solve it/



  • Osman Coskun 152 posts 355 karma points
    Dec 16, 2019 @ 09:49
    Osman Coskun

    Hi, Unfortunately i couldn't find how to use the sample code :(

  • Graham Davis 109 posts 364 karma points
    Dec 17, 2019 @ 03:26
    Graham Davis

    Are you using Visual Studio for your development? The code has to be modified slightly since Umbraco does not use .NET Core. Rewrite vCardActionResult as a controller so it can be called when a web page is loaded or called via ajax. Don't use Task and async. Throw out what they have done and use these steps in the controller instead:

    1. Declare the class

      vCard card = new vCard();

    2.Load the values

     card.FirstName = [your first name];
        card.LastName = [your last name];
    ...remaining fields …

    3 return the vCard from the controller:

    return card.ToString(); 

    note: you may also have to define a route to use the controller

Please Sign in or register to post replies

Write your reply to: