Asp.net implements Desktop shortcuts

Source: Internet
Author: User

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 ();

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.