asp.net 生成网站快捷方式

       string gameUrl = http://www.baidu.com

                string fileName = HttpUtility.UrlEncode("百度.url");

                context.Response.ContentType = "APPLICATION/OCTET-STREAM";
                context.Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName);
                context.Response.Write("[InternetShortcut]\n");
                context.Response.Write("URL=" + gameUrl + "\n");
                context.Response.Write("IDList=\n");
                context.Response.Write("IconFile=http://www.7road.com/favicon.ico\n");
                context.Response.Write("IconIndex=1\n");
                context.Response.Write("[{000214A0-0000-0000-C000-000000000046}]\n");
                context.Response.Write("Prop3=19,2\n");
                context.ApplicationInstance.CompleteRequest();

原文地址:https://www.cnblogs.com/andy_tigger/p/1860585.html