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

asp.netÌøתҳÃæµÄÈýÖÖ·½·¨±È½Ï

1¡¢ response.redirect Õâ¸öÌøתҳÃæµÄ·½·¨ÌøתµÄËٶȲ»¿ì£¬ÒòΪËüÒª×ß2¸öÀ´»Ø(2´Îpostback)£¬µ«Ëû¿ÉÒÔÌø תµ½ÈκÎÒ³Ã棬ûÓÐÕ¾µãÒ³ÃæÏÞÖÆ(¼´¿ÉÒÔÓÉÑÅ»¢Ìøµ½ÐÂÀË)£¬Í¬Ê±²»ÄÜÌø¹ýµÇ¼±£»¤¡£µ«ËÙ¶ÈÂýÊÇÆä×î´óȱÏÝ!redirectÌøת»úÖÆ£ºÊ×ÏÈÊÇ·¢ËÍÒ»¸öhttpÇëÇ󵽿ͻ§¶Ë£¬Í¨ÖªÐèÒªÌøתµ½ÐÂÒ³Ã棬Ȼºó¿Í»§¶ËÔÚ·¢ËÍÌøתÇëÇóµ½·þÎñÆ÷¶Ë¡£ÐèҪעÒâµÄÊÇÌøתºóÄÚ²¿¿Õ¼ä±£´æµÄËùÓÐÊý¾ÝÐÅÏ¢½«»á¶ªÊ§£¬ËùÒÔÐèÒªÓõ½session¡£
    2¡¢ server.transfer Ëٶȿ죬ֻÐèÒªÒ»´Îpostback ,µ«ÊÇ¡£¡£¡£¡£Ëû±ØÐëÊÇÔÚͬһ¸öÕ¾µãÏ£¬ÒòΪËüÊÇserverµÄÒ»¸ö·½·¨¡£ÁíÍ⣬ËûÄÜÌø¹ýµÇ¼±£»¤¡£Äã¿ÉÒÔд¸öС³ÌÐòÊÔÊÔ£ºÉè¼ÆÒ»¸öÓÉÒ³ÃæÒ»µ½Ò³Ãæ¶þµÄÌøת£¬µ«Òª½øÈëµ½Ò³Ãæ¶þÐèÒªµÇ¼£¬formÈÏÖ¤£¬µ«Èç¹ûÌøתÓï¾äʹÓÃtransferµÄ»°£¬ÄǾͲ»»áµ¯³öµÇ¼ҳÃæÁË¡£Õâ¸ö·½·¨µÄÖض¨ÏòÇëÇóÊÇ·¢ÉúÔÚ·þÎñÆ÷¶Ë£¬ËùÒÔä¯ÀÀÆ÷µÄurlµØÖ·ÈÔÈ»±£ÁôµÄÊÇÔ­Ò³ÃæµÄµØÖ·!
    3¡¢ sever.execute Õâ¸ö·½·¨Ö÷ÒªÊÇÓÃÔÚÒ³ÃæÉè¼ÆÉÏÃ棬¶øÇÒËû±ØÐëÊÇÌøתͬһվµãϵÄÒ³Ãæ¡£Õâ¸ö·½·¨ÊÇÐèÒª½«Ò»¸öÒ³ÃæµÄÊä³ö½á¹û²åÈëµ½ÁíÒ»¸öaspxÒ³ÃæµÄʱºòʹÓ㬴󲿷ÖÊÇÔÚ±í¸ñÖУ¬½«Ä³Ò»¸öÒ³ÃæÀàËÆÓÚǶÌ׵ķ½Ê½´æÔÚÓÚÁíÒ»Ò³Ãæ¡£
    ×ܽ᣺
    µ±ÐèÒª°ÑÓû§Ìøתµ½Áíһ̨·þÎñÆ÷ÉϵÄÒ³ÃæµÄʱºò £¬Ê¹ÓÃredirect
    µ±ÐèÒª°ÑÓû§Ìøתµ½·ÇaspxÒ³Ãæʱºò£¬Èçhtml£¬Ê¹ÓÃredirect
    ÐèÒª°Ñ²éѯ×Ö·û´®×÷ΪurlÒ»²¿·ÖµÄʱºò±£Áô´«¸ø·þÎñÆ÷µÄʱºò£¬ÒòΪÆäËû2ÖÖ·½·¨²»ÄÜ×öµ½2´Îpostback£¬°ÑÊý¾ÝÏÈ´ø»Ø·þÎñÆ÷£¬Ê¹ÓÃredirect
    ÐèÒªaspxÒ³Ãæ¼äµÄת»»(²»Éæ¼°µÇ¼)£¬Ê¹ÓÃtransfer
    µ±ÐèÒª°ÑaspxÒ³ÃæµÄÊä³ö½á¹û²åÈëµ½ÁíÒ»¸öaspxÒ³ÃæµÄʱºòʹÓà execute·½·¨¡£
    µ±È»£¬Íü¼ÇÁË»¹ÓÐÒ»¸ö³¬Á´½Ó!µ±È»Õâ¸ö¾Í²»ÐèÒª½²Ì«¶àÁË¡£ËûÊÇÔÚµ±ÐèÒªÓû§À´¾ö¶¨Ê²Ã´Ê±ºòÌøתҳÃ棬¾ÍʹÓó¬Á´½Ó¡£
    ˳±ãÌáһϣ¬ÈçºÎʹÓÃredirect·½·¨ÔÚ²éѯ×Ö·û´®ÖÐʹÓúº×Ö£¬ÒòΪ¾­³£µÄÇé¿öÊdzöÏÖÂÒÂ룬ԭÒòÊÇurl²»Ö§³Öºº×Ö¡£Õâ¸öʱºòÐèҪת»»£º
    ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
    string message =server.urlencode("»¶Ó­À´µ½ÈüÅÜרÀ¸");
    ÏÈת»»£¬ÔÙʹÓòéѯ×Ö·û´®
    ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
    response.redirect("w


Ïà¹ØÎĵµ£º

ASP.NETÒ³Ãæ´«Öµ

½éÉÜ£º
 
 ÔÚÍøÒ³Ó¦ÓóÌÐòµÄ¿ª·¢ÖУ¬Ò³ÃæÖ®¼äµÄ´«ÖµÓ¦¸ÃÊÇ×î³£¼ûµÄÎÊÌâÁË¡£ ÔÚÕâƪÎÄÕÂÀazamsharp ½«ÎªÎÒÃǽéÉÜһЩASP.NETÒ³Ãæ´«ÖµµÄ·½Ê½¡£±¾ÎÄËù¾ÙµÄÀý×ӷdz£¼òµ¥£¬½ö½ö°üº¬ÁËÒ»¸öÎı¾¿òºÍ¼¸¸ö°´Å¥£¬µ±°´Å¥µã»÷ʱÎı¾¿òÖеÄ×Ö·û´®½«»áÒÔ²»Í¬µÄ·½Ê½´«µÝµ½ÁíÍâµÄÒ³ÃæÈ¥¡£
 
1. Response.Redirect £¨» ......

½â¾öASP.NETÉÏ´«Îļþ´óСÏÞÖÆ

Ò»¡¢ÐÞ¸ÄÅäÖÃWeb.ConfigÎļþÖеÄhttpRuntime½Úµã
¶ÔÓÚasp.net,ĬÈÏÖ»ÔÊÐíÉÏ´«4MÎļþ,Ôö¼ÓÈçÏÂÅäÖÃ,Ò»°ã¿ÉÒÔ×Ô¶¨Òå×î´óÎļþ´óС.
Ò»¡¢ÐÞ¸ÄÅäÖÃWeb.ConfigÎļþÖеÄhttpRuntime½Úµã
¶ÔÓÚasp.net,ĬÈÏÖ»ÔÊÐíÉÏ´«4MÎļþ,Ôö¼ÓÈçÏÂÅäÖÃ,Ò»°ã¿ÉÒÔ×Ô¶¨Òå×î´óÎļþ´óС.
<httpRuntime
executionTimeout="800"
maxRequestLengt ......

ÔÚasp.NetÖÐʹÓÃfileuplod¿Ø¼þʵÏÖÉÏ´«Í¼Æ¬µÄ¹¦ÄÜ

ºÜ¶àµØ·½¶¼Ó¦Óõ½Í¼Æ¬ÉÏ´«¹¦ÄÜ£¬ÄÇô¾¿¾¹ÔõÑù¿ÉÒÔʵÏÖÄØ?ÏÂÃæÎÒÀ´¸ø´ó¼Ò½øÐн²½â
ÔÚvisual studioÖÐ×Ô´øµÄÒ»¸ö¿Ø¼þfileupload£¬¿ÉÒÔʵÏִ˹¦ÄÜ£¬ÎÒÒª¸ø´ó¼Ò½éÉܵÄÊÇËüµÄÓ÷¨¡£
 
Ê×ÏÈҪн¨Ò»¸öÍøÒ³£¨ÏÂÃæÊÇÎÒ´´½¨ºÃµÄÒ»¸öÍøÒ³£©
ÔÚÍøÒ³ÖÐÍϽøfileupload¿Ø¼þ£¬ºóÃæ·ÅÒ»¸öÉÏ´«°´Å¥
ÕâÑù£¬µ±ÎÒÃǵã»÷ÉÏ´«°´Å¥Ê±£¬Í¼ ......

ASP.netÁ¬½ÓExcel

Ê×ÏÈÌí¼ÓÃüÃû¿Õ¼ä
using System.Data.OleDb;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
strfile = Request.QueryString["filename"];//´ÓÆäËûÒ³Ãæ´«¹ýÀ´µÄÎļþ·¾¶
Excel(strfile);
}
}

private v ......

ASP.NetÖÐMD5ºÍSHA1¼ÓÃܵļ¸ÖÖ·½·¨

Ê×Ïȼòµ¥½éÉÜÒ»ÏÂMD5ºÍSHA1:
MD5µÄÈ«³ÆÊÇMessage-Digest Algorithm 5£¨ÐÅÏ¢-ÕªÒªËã·¨£©£¬ÔÚ90Äê´ú³õÓÉMit Laboratory for Computer ScienceºÍRsa data security incµÄRonald l. rivest¿ª·¢³öÀ´£¬¾­md2¡¢md3ºÍmd4·¢Õ¹¶øÀ´¡£ËüµÄ×÷ÓÃÊÇÈôóÈÝÁ¿ÐÅÏ¢ÔÚÓÃÊý×ÖÇ©ÃûÈí¼þÇ©Êð˽ÈËÃܳ×Ç°±»"ѹËõ"³ÉÒ»ÖÖ±£Ãܵĸñʽ£¨¾ÍÊÇ°ÑÒ»¸öÈÎÒâ³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ