asp/asp.net生成网站快捷方式

  asp.net生成网站快捷方式源代码

shortcut.aspx.cs

    protected void Page_Load(object sender, EventArgs e)
    {
        string Shortcut = "[InternetShortcut] " + Environment.NewLine;
        Shortcut += "URL=http://www.w3dev.cn/" + Environment.NewLine;//注意修改链接地址
        Shortcut += "IDList= " + Environment.NewLine;
        Shortcut += "[{000214A0-0000-0000-C000-000000000046}] " + Environment.NewLine;
        Shortcut += "Prop3=19,2 " + Environment.NewLine;
        Shortcut += " " + Environment.NewLine;
        Response.AddHeader("Content-Disposition", "attachment;filename=\"w3dev.url\"");
        Response.ContentType = "application/octet-stream";
        Response.Write(Shortcut);
    }

  asp生成网站快捷方式源代码

shortcut.asp

<%
Dim Shortcut
Shortcut = "[InternetShortcut] " & vbCrLf
Shortcut = Shortcut & "URL=http://www.w3dev.cn/" & 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=w3dev.url;"
Response.ContentType = "application/octet-stream"
Response.Write Shortcut
 %>

 

加支付宝好友偷能量挖...


原创文章,转载请注明出处:asp/asp.net生成网站快捷方式

评论(0)Web开发网
阅读(137)喜欢(0)Asp.Net/C#/WCF