Click here to Skip to main content
15,911,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

C#
var uri = "data:text/calendar;charset=utf8," + escape(data);
////this trick will generate a temp tag
var link = document.createElement("a");
link.href = uri;
//set the visibility hidden so it will not effect on your web-layout
link.style = "display:none";
link.download = "test.ics";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);

The above code is working fine in Firefox,Chrome. It is not working with Internet Explorer.(IE10). I want this solution to work for IE-9 & IE-10. Any help on this regard
Posted
Updated 11-Jan-16 18:57pm
v2
Comments
Sinisa Hajnal 8-Jan-16 10:16am    
What have you tried? google a bit and then ask if you don't find anything.
Sinisa Hajnal 12-Jan-16 2:40am    
Yes, use jQuery to create the element. You will avoid most if not all interbrowser problems.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900