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

Asp.NetÎļþÉÏ´«

 ÓÃAsp.NetÉÏ´«Îļþ,Ê×Óõ½µÄÊÇFileUpload¿Ø¼þ
<asp:FileUpload ID="FileUpload1" runat="server" /><br />
<asp:Button ID="btn" runat="server" Text="È·¶¨" OnClick="btn_Click"/>
C#´úÂë
protected void btn_Click(object sender, EventArgs e)
{
//ÅжÏÊÇ·ñÑ¡ÔñÁËÎļþ
if (this.FileUpload1.HasFile)
{
try{
//»ñÈ¡Îļþ
HttpPostedFile filename = this.FileUpload1.PostedFile;
//ÅжÏÎļþ´óС,×Ö½ÚΪµ¥Î»
if (filename.ContentLength>0)
{

FileUpload1.SaveAs(@"D:\" + FileUpload1.FileName);
s_alert("ÉÏ´«³É¹¦");
}
}
catch (Exception ex)
{
s_alert ("ÉÏ´«Ê§°Ü,³öÏÖ´íÎó");
}
}
else
{
s_alert("Ä㻹ûÓÐÑ¡ÔñÎļþ");
}
}
public static void s_alert(string str)
{
Page page = (Page)HttpContext.Current.Handler;
page.ClientScript.RegisterStartupScript(page.GetType(), Guid.NewGuid().ToString(), "alert('" + str + "');", true);
}



Ïà¹ØÎĵµ£º

asp.net °´Å¥onclickʼþ´¥·¢²»ÁË

Óö¼û¹ýÕâÑùµÄÎÊÌ⣬ºÜÆæ¹Ö£¬¾ÍÊÇ asp.net button°´Å¥onclickʼþ´¥·¢²»ÁË£¬
µã»÷û·´Ó¦£¬È»ºóÔÚÍøÉϲéÁËЩ×ÊÁÏ£¬·¢ÏÖÒ»¸ö˵·¨£¬“Ò»°ãÀ´ËµÊÇ¿Í»§¶ËÔ´´úÂëÖÐÓжà¸öform±êʶ£¬»á³öÏÖÕâÖÖÇé¿ö”
ÓÚÊǾͲ鿴×Ô¼ºµÄÒ³Ãæ´úÂ룬ÕæµÄÓÐÁ½¸öform£¬È¥µôÒ»¸öºó£¬¾ÍÕý³£À²£¬
ÖÁÓÚ ÕâÖÖÇé¿ö£¬Ôڴ˼ÇÏÂÀ´£¬×÷¸öѧϰµÄÒ»¸öÐ¡Ö ......

ASP.NETʹÓÃÎÞCookieµÄ±íµ¥ÈÏ֤Ʊ¾Ý

ASP.NET
ʹÓÃÎÞCookieµÄ±íµ¥ÈÏ֤Ʊ¾Ý
ĬÈÏÇé¿öÏ£¬forms authentication system½«¾ö¶¨Êǽ«Æ±¾Ý´æ´¢ÔÚcookies
collectionÀﻹÊDzåÈëÓû§·ÃÎÊÒ³ÃæµÄURLÀï¡£ËùÓÐÖ÷Á÷µÄ×ÀÃæä¯ÀÀÆ÷£¬±ÈÈçInternet
Explorer£¬Firefox£¬Opera£¬»òSafari¶¼Ö§³Öcookies£¬µ«²¢·ÇËùÓеÄÒƶ¯É豸¶¼Ö§³Ö¡£
forms authentication systemʹÓúÎÖÖco ......

asp.netµ¼³öµ½excel

   µ¼³öµ½excelµÄ·½·¨ÓжàÖÖ£¬±È½Ï³£¼ûµÄÊÇÖ±½Óµ¼³öµ½EXCEL,»¹ÓоÍÊÇÏȽ«Ò³ÃæµÄÊý¾Ýдµ½´ÅÅÌÎļþ£¬Ö®ºóÖ±½ÓÔÙ´ò¿ªÎļþ£¬ÁíÍ⻹ÓоÍ
ÊǽèÖúµÚÈý·½µÄ¿Ø¼þ¡£
Ç°¶Îʱ¼äдµÄµ¼³öÊý¾Ýµ½excelÔÚexcel2003ÖÐÕý³£¶øÔÚexcel2007ÖÐÊý¾ÝÂÒÂ룬½ñÌìÁ˽⵽ԭÀ´ÊÇResponse.ContentType = "application/ms-excel";µ¼Öµģ¬¸ÄΪR ......

ASP.NETʵÏֶϵãÐø´«µÄÔ­Àí

ÔÚÁ˽âHTTP¶ÏµãÐø´«µÄÔ­Àí֮ǰ£¬ÏÈÀ´ËµËµHTTPЭÒ飬HTTPЭÒéÊÇÒ»ÖÖ»ùÓÚtcpµÄ¼òµ¥Ð­Ò飬·ÖΪÇëÇóºÍ»Ø¸´Á½ÖÖ¡£ÇëÇóЭÒéÊÇÓÉ¿Í»§»ú(ä¯ÀÀÆ÷)Ïò·þÎñÆ÷£¨WEB SERVER£©Ìá½»ÇëÇóʱ·¢Ëͱ¨ÎĵÄЭÒé¡£»Ø¸´Ð­ÒéÊÇÓÉ·þÎñÆ÷(web server)£¬Ïò¿Í»§»ú(ä¯ÀÀÆ÷)»Ø¸´±¨ÎÄʱµÄЭÒé¡£ÇëÇóºÍ»Ø¸´Ð­Ò鶼ÓÉÍ·ºÍÌå×é³É¡£Í·ºÍÌåÖ®¼äÒÔÒ»ÐпÕÐÐΪ·Ö¸ô¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ