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

asp.netµ¼³öExcelʱ Êý×Öת»»Îı¾µÄÎÊÌâ

Ò³Ãæµ¼³öExcelʱ£¬³£ÓõÄÖ±½ÓRenderControlµÄ·½·¨£¬Èç¹û±í¸ñÖÐÓÐÊý×Ö£¬ÔÚExcelÖÐÍùÍù¸ñʽ»áÂÒ£¬±ÈÈçÇ°ÃæÓÐ0£¬µ«ÏÔʾ³öÀ´ºó0¶¼±»È¥µôÁË¡£
Òò´ËÒªÔÚ°ó¶¨Êý×ÖµÄʱºò£¬ÊÖ¶¯Ö¸¶¨Ò»Ï´ËÁеĸñʽ£¬ÈÃÊý×ÖÒÔÎı¾·½Ê½ÏÔʾ¾ÍÐÐÁË
 protected void myGridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//ÈÃÊý×ÖÒÔÎı¾ÐÎʽ±íʾ
e.Row.Cells[4].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
}
}


Ïà¹ØÎĵµ£º

ËÀÔÚasp.netÒ³ÃæÉúÃüÖÜÆÚ...

ÒýÓÃ×Ô£ºhttp://www.cnblogs.com/suzongwei/archive/2008/11/10/1330377.html
»òÐí Õâ¸ö¸üÒ׶®Ð© ´úÂë¹ý³Ì
http://blog.csdn.net/swort_177/archive/2007/12/02/1912159.aspx
¶ÔÓÚASP.NET¿ª·¢Õߣ¬Àí½âASP.NETµÄÒ³ÃæÉúÃüÖÜÆÚÊǷdz£ÖØÒªµÄ¡£
Ö÷ÒªÊÇΪÁ˸ãÃ÷°×ÔÚÄÄÀï·ÅÖÃÌض¨µÄ·½·¨ºÍÔÚºÎʱÉèÖø÷ÖÖÒ³ÃæÊôÐÔ¡£
µ«ÊǼÇÒäºÍ ......

̽Ë÷Asp.netµÄPostback»úÖÆ

/* from: http://www.techmango.com/blog/article/DotNet/Explore_Asp_net_postback_mechanism.htm */
__doPostBack×÷ΪÔÚasp.netÖÐÒ»¸öºÜºËÐĺÜÖØÒªµÄ²¿·Ö,ÎÒÃÇÓбØÒªÉîÈëÁ˽âÒ»ÏÂ.
Æäʵ,__doPostBackÊÇÒ»¸öºÜ¼òµ¥µÄ½Å±¾º¯Êý.´úÂëÈçÏÂ:
//__doPostBack<input type="hidden" name="__EVENTTARGET" id="__EVENTTA ......

asp.net µÈ±ÈÀýÉú³ÉÉÏ´«Í¼Æ¬µÄ¸ßÖÊÁ¿ËõÂÔͼµÄ·½·¨

·½·¨1
HttpFileCollection files   = HttpContext.Current.Request.Files;
//ÎÒÉèÖõĴóС²»³¬¹ýA4Ö½µÄËõÂÔͼ
int newWidth=620;
int newHeight=880;
System.Drawing.Image img = null;
            
for(int iFile = 0; iFile < files.C ......

asp.net È¡µÃÓû§¿Ø¼þÀïµÄÊôÐÔ»ò¿Ø¼þ

×î½üÔÚÓÃÓû§¿Ø¼þʱ£¬ÒýÓû§¿Ø¼þµÄÒ³ÃæÓÐʱºò»áºÍÓû§¿Ø¼þ½øÐÐÊý¾ÝµÄ½»»¥£¬ÍøÉϺÃÏñºÜ¶àÈ˲»ÖªµÀºÎ»ñÈ¡
д¸öÀý×Ó˵Ã÷Ò»ÏÂ
 
È¡µÃÓû§¿Ø¼þÀïÃæµÄ¿Ø¼þ²¢½øÐи³Öµ
Óû§¿Ø¼þaspxÒ³´úÂë
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="HeadPanel.ascx.cs" Inherits="HeadPanel" %>
  & ......

¡¶ASP.NET MVC ÈëÃÅϵÁн̡̳·

ʲôÊÇMVCģʽ
MVC£¨Model-View-Controller£¬Ä£ÐÍ—ÊÓͼ—¿ØÖÆÆ÷ģʽ£©ÓÃÓÚ±íʾһÖÖÈí¼þ¼Ü¹¹Ä£Ê½¡£Ëü°ÑÈí¼þϵͳ·ÖΪÈý¸ö»ù±¾²¿·Ö£ºÄ£ÐÍ£¨Model£©£¬ÊÓͼ£¨View£©ºÍ¿ØÖÆÆ÷£¨Controller£©¡£
ÄÇôMVCģʽºÍÎÒÃÇÊìϤµÄWebFormģʽÓÐʲô²»Í¬ÄØ£¿ËûµÄ¸÷¸ö²¿·ÖÓÖÊÇÔõÑù·Ö¹¤µÄÄØ£¿
ÎÒÃÇÏÈÀ´¿´Ò»ÏÂÆÕͨµÄWebFormģʽÏ£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ