------------asp----------
<%
Response.ContentType="APPLICATION/OCTET-STREAM"
Response.AddHeader "Content-Disposition","attachment;filename="&"网页吧.url"
Response.Write("[InternetShortcut]")&Chr(13)
Response.Write("URL=http://www.wangyeba.com")&Chr(13)
Response.Write("IDList=")&Chr(13)
Response.Write("[{000214A0-0000-0000-C000-000000000046}]")&Chr(13)
Response.Write("Prop3=19,2")&Chr(13)
Response.End
%>-----------php------------
<?php
$Shortcut = &quot;[InternetShortcut]
URL=http://116.la
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
&quot;;
Header(&quot;Content-type: application/octet-stream&quot;);
header(&quot;Content-Disposition: attachment; filename=116啦网址导航.url;&quot;);
echo $Shortcut;
?>-----------asp.net-------
Response.ClearContent();
Response.Charset = "gb2312";

string sitename = "youjiang";
Response.AddHeader("content-disposition", "attachment; filename=" + sitename + ".url");
Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
Response.ContentType = "APPLICATION/OCTET-STREAM";

Response.Write("[InternetShortcut]/r/n");
Response.Write("URL=http://www.youjiang.com/r/n");
Response.Write("IDList=/r/n");
Response.Write("[{000214A0-0000-0000-C000-000000000046}]/r/n");
Response.Write(" Prop3=19,2/r/n");
Response.End();中文标题解决办法
Response.ClearContent();
if (HttpContext.Current.Request.Browser.Browser != "IE")
{
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=/"友奖网.url/"");
}
else
{
string sitename = HttpUtility.UrlEncode(System.Text.Encoding.UTF8.GetBytes("友奖网.url"));
Response.AddHeader("content-disposition", "attachment; filename=" + sitename);
}
Response.ContentType = "APPLICATION/OCTET-STREAM"; Response.Write("[InternetShortcut]/r/n");
Response.Write("URL=http://www.youjiang.com/r/n");
Response.Write("IDList=/r/n");
Response.Write("[{000214A0-0000-0000-C000-000000000046}]/r/n");
Response.Write(" Prop3=19,2/r/n");
Response.End();------------------