分享你我的心得.
共乘一片美好网络.

Asp创建网页桌面快捷方式的代码

asp实现在用户桌面创建一个快捷方式,这样用户可以直接双击这个快捷方式打开你的网站。    代码如下:

    <%

    title=”小叶白龙的博客系统”

    Shortcut = “[InternetShortcut] ” & vbCrLf

    Shortcut = Shortcut & “URL=http://www.xiaoyebailong.com” & vbCrLf

    Shortcut = Shortcut & “IDList= ” & vbCrLf

    Shortcut = Shortcut & “[{000214A0-0000-0000-C000-000000000046}] ” & vbCrLf

    Shortcut = Shortcut & “Prop3=19,2 ” & vbCrLf

    Shortcut = Shortcut & ” ” & vbCrLf

    Response.AddHeader “Content-Disposition”, “attachment;filename=”&title&”.url;”

    Response.ContentType = “application/octet-stream”

    Response.Write Shortcut

    %>

    把上面的代码保存为asp文件,运行就可以看到效果了。

    如果你要想将你的asp网站的图标出现,请先确保网站根目录中有 favicon.ico 文件。

赞(0)
未经允许不得转载:小叶白龙博客 » Asp创建网页桌面快捷方式的代码
分享到: 更多 (0)

评论 11

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址