Asp.netÉú³É¸÷ÖÖÍøÒ³¿ì½Ý·½Ê½
2 using System.Data;
3 using System.Configuration;
4 using System.Collections;
5 using System.Web;
6 using System.Web.Security;
7 using System.Web.UI;
8 using System.Web.UI.WebControls;
9 using System.Web.UI.WebControls.WebParts;
10 using System.Web.UI.HtmlControls;
11
12 public partial class CreateShortcut : System.Web.UI.Page
13 {
14 protected void Page_Load(object sender, EventArgs e)
15 {
16 }
17
18 /// <summary>
19 /// ´´½¨¿ì½Ý·½Ê½
20 /// </summary>
21 /// <param name="Title">±êÌâ</param>
22 /// <param name="URL">URLµØÖ·</param>
23 private void CreateShortcut(string Title, string URL)
24 {
25 string strFavoriteFolder;
26
27 // ¡°ÊղؼС±ÖÐ ´´½¨ IE ¿ì½Ý·½Ê½
28 strFavoriteFolder = System.Environment.GetFolderPath(Environment.SpecialFolder.Favorites);
29 CreateShortcutFile(Title, URL, strFavoriteFolder);
30
31 // ¡° ×ÀÃæ ¡±ÖÐ ´´½¨ IE ¿ì½Ý·½Ê½
32 strFavoriteFolder = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
33 CreateShortcutFile(Title, URL, strFavoriteFolder);
34
35 // ¡° Á´½Ó ¡±ÖÐ ´´½¨ IE ¿ì½Ý·½Ê½
36 strFavoriteFolder = System.Environment.GetFolderPath(Environment.SpecialFolder.Favorites) + "\\Á´½Ó";
37 CreateShortcutFile(Title, URL, strFavoriteFolder);
38
39 //¡¸¿ªÊ¼¡¹²Ëµ¥ÖÐ ´´½¨ IE ¿ì½Ý·½Ê½
40 strFavoriteFolder = System.Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
41 CreateShortcutFile(Title, URL, strFavoriteFolder);
42
43 }
44
45 /// <summary>
46 /// ´´½¨¿ì½Ý·½Ê½
47 /// </summary>
48 /// <param name="Title">±êÌâ</param>
49 /// <param name="URL">URLµØÖ·</param>
50 /// <param name="SpecialFolder">ÌØÊâÎļþ¼Ð</param>
51 private void CreateShortcutFile(string Title, string URL, string SpecialFolder)
52 {
53 // Create shortcut file, based on Title
54 System.IO.StreamWriter objWriter = System.IO.File.CreateText(SpecialFolder + "\\" + Title + ".url");
55 // Write URL to file
56 objWriter.WriteLine("[InternetShortcut]");
57 objWriter.WriteLine("URL=" + URL);
58 // Close file
59 objWriter.Close();
60 }
61
62 private void btnShortcut_Click(object sender, System.EventArgs e)
63 {
64 CreateShortcut("ITÄñµÄרÀ¸ - ²©¿ÍÔ²", http://www.cnblogs.com/ITniao/);
65 }
66 }
תÖÁITÄñµÄרÀ¸
Crazy Cherry:everything is possible!
ÍƼöÐÅÏ¢
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- Asp.net MVCÔ´Âë·ÖÎö--Model Validation(Se....
- .Net À¬»ø»ØÊÕ»úÖÆÔÀíºÍËã·¨£¨Ò»£©
- .netʵÌåнâ
- ·ÖÎöASP.NET¶ÁÈ¡XMLÎļþ4ÖÖ·½·¨
- »ñÈ¡ÍøÕ¾ËõÂÔͼ´úÂë
- Asp.net ¸ù¾ÝIPµØÖ·»ñÈ¡¿çÍø¶ÎmacµØÖ·º¯Êý¡¾ËѲء¿
- ¹ýÂËÃô¸Ð¹Ø¼ü×Ö¡£
- Éú³ÉÖ¸¶¨Î»ÊýµÄËæ»ú×Ö·û´®
- ¿Í»§¶Ë»ñÈ¡MACµØÖ·£¬µ½·þÎñÆ÷ÑéÖ¤
- ²½²½ÎªÓª .NETÈý²ã¼Ü¹¹½âÎö ¶þ¡¢Êý¾Ý¿âÉè¼Æ
ÆÀÂÛ