jquery - Generate .ics from json -


i'm trying export calendar outlook json data stream.
i'm pretty sure sort of thing in .net rendering response following header definitions:

response.contenttype = "text/calendar"; response.addheader("content-disposition", "attachment; filename=calendarevent1.ics"); 

i'm using following jquery retrieve data , i've verified data coming properly, i'm stuck on how proceed rendering output such open calendar in outlook. i'm sure it's i'd need add success: function(data){} block, i'm not sure what. think can figure out how iterate through json elements , pull necessary data (title, start, end, etc.), don't know where/how set header information , how ensure stream output in new window guess (so existing screen isn't affected)? want user click on "export calendar" link , new calendar open in outlook event dates json response. thanks.

$('#exportcal').click(function() {     var jdata = {officeid:"0", filter:"all", start:"2016-01-31", end:"2016-03-13"};      $.ajax({         url: "@(url.content("~/solicitation/geteventdates/"))",         type: 'get',         data: jdata,         success: function(data) {                         }                         }); }); 


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -