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

asp.netÀïµ¼³öexcel±í·½·¨»ã×Ü

 1¡¢ÓÉdatasetÉú³É
public void CreateExcel(DataSet ds,string typeid,string FileName) 
  {
   HttpResponse resp;
   resp = Page.Response;
   resp.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
   resp.AppendHeader("Content-Disposition", "attachment;filename=" + FileName);   
   string colHeaders= "", ls_item="";
   int i=0;
 
   //¶¨Òå±í¶ÔÏóÓëÐжÔÏñ£¬Í¬Ê±ÓÃDataSet¶ÔÆäÖµ½øÐгõʼ»¯
   DataTable dt=ds.Tables[0];
   DataRow[] myRow=dt.Select(""); 
   // typeid=="1"ʱµ¼³öΪEXCEL¸ñʽÎļþ£»typeid=="2"ʱµ¼³öΪXML¸ñʽÎļþ
   if(typeid=="1")
   {
    //È¡µÃÊý¾Ý±í¸÷ÁбêÌ⣬¸÷±êÌâÖ®¼äÒÔ\t·Ö¸î£¬×îºóÒ»¸öÁбêÌâºó¼Ó»Ø³µ·û
    for(i=0;i     colHeaders+=dt.Columns[i].Caption.ToString()+"\t";
    colHeaders +=dt.Columns[i].Caption.ToString() +"\n";   
    //ÏòHTTPÊä³öÁ÷ÖÐдÈëÈ¡µÃµÄÊý¾ÝÐÅÏ¢
    resp.Write(colHeaders); 
    //ÖðÐд¦ÀíÊý¾Ý  
    foreach(DataRow row in myRow)
    {
     //ÔÚµ±Ç°ÐÐÖУ¬ÖðÁлñµÃÊý¾Ý£¬Êý¾ÝÖ®¼äÒÔ\t·Ö¸î£¬½áÊøʱ¼Ó»Ø³µ·û\n
     for(i=0;i      ls_item +=row[i].ToString() + "\t";     
     ls_item += row[i].ToString() +"\n";
     //µ±Ç°ÐÐÊý¾ÝдÈëHTTPÊä³öÁ÷£¬²¢ÇÒÖÿÕls_itemÒÔ±ãÏÂÐÐÊý¾Ý    
     resp.Write(ls_item);
     ls_item="";
    }
   }
   else
   {
    if(typeid=="2")
    { 
     //´ÓDataSetÖÐÖ±½Óµ¼³öXMLÊý¾Ý²¢ÇÒдµ½HTTPÊä³öÁ÷ÖÐ
     resp.Write(ds.


Ïà¹ØÎĵµ£º

ASP.NET¹ØÓÚÌõÐÎÂëµÄÉú³ÉÎÊÌâ¼æÍøÒ³´òÓ¡

ÌõÐÎÂëÊÇÆù½ñΪֹ×î¾­¼Ã¡¢ÊµÓõÄÒ»ÖÖ×Ô¶¯Ê¶±ð¼¼Êõ¡£ÌõÐÎÂë¼¼Êõ¾ßÓÐÒÔϼ¸¸ö·½ÃæµÄÓŵã
¡¡¡¡A£®ÊäÈëËٶȿ죺Óë¼üÅÌÊäÈëÏà±È£¬ÌõÐÎÂëÊäÈëµÄËÙ¶ÈÊǼüÅÌÊäÈëµÄ5±¶£¬²¢ÇÒÄÜʵÏÖ“¼´Ê±Êý¾ÝÊäÈ딡£
¡¡¡¡B£®¿É¿¿ÐԸߣº¼üÅÌÊäÈëÊý¾Ý³ö´íÂÊΪÈý°Ù·ÖÖ®Ò»£¬ÀûÓùâѧ×Ö·ûʶ±ð¼¼Êõ³ö´íÂÊΪÍò·ÖÖ®Ò»£¬¶ø²ÉÓÃÌõÐÎÂë¼¼ÊõÎóÂëÂʵ ......

dz̸ASP.net°²È«±à³Ì

ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......

¿ª·¢×Ô¶¨Òå¿Ø¼þ (asp.net C#)

 Ñ§Ï°×Ô¶¨Òå¿Ø¼þµÄ¿ª·¢²»½ö¿ÉÒÔʹÄ㿪·¢³ö¸üÁé»îµÄϵͳ¸üÖØÒªµÄÊÇËü¿ÉÒÔʹÄã¼ÓÉî¶ÔÒÑÓзþÎñÆ÷¿Ø¼þµÄÀí½â£¬µÃÒÔ¸üÁé»îµÄÓ¦Óá£
½ÏÖ®ÓÚasp£¬asp.netÌṩÁ˸üÇ¿´óµÄ¹¦ÄÜ£¬ÎұȽÏϲ»¶ËüµÄ´úÂë·ÖÀë¼¼ÊõºÍ¶ÔÖîÈçC#¡¢VB.NetµÈÇ¿ÀàÐÍÓïÑÔµÄʹÓã¬ÕâÊÇ´Ó¿ª·¢ÕߵĽǶÈÀ´¿´
µÄ£¬´ÓÓû§µÄ½Ç¶ÈÀ´¿´£¬»á¾õµÃËüËٶȸü¿ì£¬ÔËÐиüÎȶ¨ ......

ASP.NET ´óÁ¿Êý¾Ý²éѯ·ÖÒ³Àý×Ó

 ·ÖÒ³Õâ¸öÒ²ÊÇ×î¶àÈËÎʵģ¬Ò²ÊǺܻù´¡ºÜʵÓõġ£
ÍøÉÏÓкܶà·ÖÒ³´úÂë,Òª²»ÊÇÓÐǰ̨¾Íûºǫ́,Òª²»ÊÇÓкǫ́ûǰ̨,Òª²»ÊǾÍÊǿؼþ,Òª²»¾ÍÊÇÒ»´ó¶ÑSQL´úÂ룬ÈÃÈ˲»ÖªµÀÔõÑùÓá£
Á¦Çó×î¼òµ¥×îÒ׶®.Èý²ã¼Ü¹¹ÄÇЩ¾Í²»¸ãÁË¡£×Ô¼ºÏÂÔØÒ»¸ö
Èç¹ûÊÇaccess ¾ÍÓÃÕâ¸öSQLHELPER [URL=http://hi.csdn.net/link.php?url=http://blo ......

ASP.NETÖÐListBoxʵÏÖDouble Clickʼþ

(1)ÔÚWEBÒ³ÃæÉϼÓÈëJS½Å±¾ºÍ´æ·ÅListBoxʼþµÄÒþ²ØÊäÈë¿ò,LISTBOXÊÇÓÃÀ´±£´æʱ¼äµÄÃû³Æ,ÔÚCSÒ³ÃæÓõ½:ÆäJS´úÂëÈçÏÂ:
<script language="javascript">
     function ListBox1_DoubleClick() {
       /* we will change value of this hidden field so  t ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ