skeletank
skeletank

Reputation: 2888

Using ASP.NET MVC how do I create a link for subscribing to an iCal from Outlook

I have a calendar in my ASP.NET MVC site that I want to publish so that it can be subscribed to by an Microsoft Outlook client. How can I accomplish this without manually specifying the whole url (for example using Url.Action)? The format should be:

webcals://mywebsite.com/ProjectDate/MyDates

Note - I'm using https so the webcal protocol is webcals. If I were using standard http then the protocol would be webcal.

Upvotes: 0

Views: 635

Answers (1)

skeletank
skeletank

Reputation: 2888

The Url.Action method has a "protocol" parameter that you can use to specify "webcals" as the protocol. Here is an example:

<a href="@Url.Action("MyDates", "ProjectDate", null, "webcals")">

Upvotes: 1

Related Questions