Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C# ÖÐÔõÑù½«·þÎñÆ÷¶ËµÄÎļþÏÂÔØµ½¿Í»§¶Ë

C# ÖÐÔõÑù½«·þÎñÆ÷¶ËµÄÎļþÏÂÔØµ½¿Í»§¶Ë
ʲôÒâ˼°¡£¬VS±£»¤µÄÎļþÄãÊÇûÓа취Ï嵀 °¡

±ðµÄÖîÈçһЩÊÓÆµ£¬Í¼Æ¬£¬Ñ¹Ëõ°ü¶¼¿ÉÒÔͨ¹ýÁ÷½øÐÐÏÂÔØµÄ°¡

簡單µÄ¾Í <A>

˵Çå³þÎÊÌâ¡£

C# code:

public bool downfile(string url,string LocalPath)
{
try
{
Uri u = new Uri(url);
HttpWebRequest mRequest = (HttpWebRequest)WebRequest.Create(u);
mRequest.Method = "GET";
mRequest.ContentType = "application/x-www-form-urlencoded";

HttpWebResponse wr = (HttpWebResponse)mRequest.GetResponse();

Stream sIn = wr.GetResponseStream();
FileStream fs = new FileStream(LocalPath, FileMode.Create, FileAccess.Write);

long length = wr.ContentLength;
long i = 0;
decimal j=0;

while (i < length)
{
byte[] buffer = new byte[1024];
i += sIn.Read(buffer, 0, buffer.Length);
fs.Write(buffer, 0, buffer.Length);

if((i % 1024)==0)
{
j=Math.Round(Convert.ToDecimal((Convert.ToDouble(i)/Convert.ToDouble(length))*100),4);
statusBar1.Text="µ±Ç°ÏÂÔØÎļþ´óС:"+length.ToString()+"×Ö½Ú µ±Ç°ÏÂÔØ´óС:"+i+"×Ö½Ú ÏÂÔØ½ø¶È"+j.ToString()+"%";

}
else
{
statusBar1.Text="µ±Ç°ÏÂÔØÎļþ´óС:"+length.ToString()+"×Ö½Ú µ±Ç°ÏÂÔØ´óÐ


Ïà¹ØÎÊ´ð£º

ÔÚC#ÖÐÔõô°ÑÒ»¸öExcel±£´æ³ÉΪһ¸öHtmlÎļþ?

ÔÚC#ÖÐÔõô°ÑÒ»¸öExcel±£´æ³ÉΪһ¸öHtmlÎļþ?
ÈçͬÔÚExcelÖР Îļþ——±£´æÎª——¸ñʽѡΪhtml Éú³ÉµÄÎļþ ¼°Îļþ¼Ð£¨ÔÚ¶àÕÅsheet ʱ£©

ÒýÓÃ
excelapp.Workbooks[1].PublishObjects ......

c# winform´°ÌåÎÊÌâ

ÎÒÔÚform1ÖеÄij¸ö·½·¨ÈÃform2´°Ìå³öÏÖ
ÄÇôÕâ¸öʱºòÔõô¹Ø±Õform1¶ø²»¹Ø±Õform2ÄØ£¿
Form2 f=new Form2();
f.Show();
this.Close();

ÒýÓÃ
Form2 f=new Form2();
f.Show();
this.Close();
ÕâÑùµÄ»°Õû¸ö³Ì ......

¹ØÓÚajaxµÄÒ»¸öÎÊÌâ - .NET¼¼Êõ / C#

ÎÒµÄajaxµÄupdatepanel¿Ø¼þÀïµÄÃæ²»ÄÜÖ´ÐÐresponse.write£¬¿ÉÊÇÎÒÐèÒªµ¯³ö¶Ô»°¿ò£¬ÎÒÒªÔõô×öÄØ£¿
ÓÐûÓв»ÐèÒªresponse.writeµ¯Ìáʾ¿òµÄ×ö·¨ÄØ£¿
ÁíÍâÎÒµÄÒ³ÃæÉÏÓÐÒ»¸öwebÓû§¿Ø¼þ£¬È»ºó·ÅÒ»¸ögridviewÔÚupdatepa ......

½ØÈ¡WINfromÖÐHTMLµÄ±êÇ©£¡£¡£¡ - .NET¼¼Êõ / C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Syst ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ