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:
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
Generate vCard From Content Node
Hello,
I want to generate downloadable vCard generated from information in staff profile content. I found https://dzone.com/articles/creating-vcard-in-aspnet-core 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...
Hi Osman
Did you solve this issue? Can you share with our community how did you solve it/
Thanks,
Alex
Hi, Unfortunately i couldn't find how to use the sample code :(
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:
Declare the class
vCard card = new vCard();
2.Load the values
3 return the vCard from the controller:
note: you may also have to define a route to use the controller
is working on a reply...