If you want your website to create a shortcut on the desktop, click the shortcut icon to open the website.
You must use a URL file.
I wanted to simulate kaixin.com's "set as a desktop icon". Unfortunately, PHP cannot be used in Asp.net.
In addition, according to a lot of online statements, they cannot be implemented, and empty connections are invalid shortcuts.
After a lot of research, I finally solved this problem and shared it with everyone. I hope that people with the same problems can get help.
The following is the implementation code, which can be used after being added. It has been tested.
Response. contenttype = "application/OCTET-STREAM"; <br/> response. addheader ("content-disposition", "attachment; filename = Sohu. URL "); <br/> response. write ("[internetshortcut]/n"); <br/> response. writes ("url = http://www.sohu.com//n"); <br/> response. write ("idlist =/N"); <br/> response. write ("iconfile = http://www.sohu.com/images/favicon.ico/n"); <br/> response. write ("iconindex = 1/N"); <br/> response. write ("[{000214a0-0000-0000-c000-000000000046}]/n"); <br/> response. write ("prop3 = 19,2/N"); <br/> response. write ("[Default]/n"); <br/> response. write ("baseurl = http://www.sohu.com/"); <br/> response. end ();