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

asp.net ʵÏÖexcelµ¼Èëµ½Êý¾Ý¿â

//ExcelÅúÁ¿µ¼Èëµ½Êý¾Ý¿â
      protected void btnUpload_Click(object sender, EventArgs e)
      {   
         string IsXls = System.IO.Path.GetExtension(UploadExcel.FileName.ToString().ToLower());
         if (IsXls != ".xls")
         {
             Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script type='text/javascript' language='javascript'>alert('Ö»¿ÉÒÔÑ¡ÔñExcelÎļþ');location.href='EmployeeAddPage.aspx';</script>");
               return;//µ±Ñ¡ÔñµÄ²»ÊÇExcelÎļþʱ,·µ»Ø
         }
          string filePath = UploadExcel.PostedFile.FileName;
          string fileName = UploadExcel.FileName;
          DataSet ds = ExecleDs (filePath,fileName);
          CommonLayer.employeeModel model = new CommonLayer.employeeModel();
          DataAcessLayer.employee_infomation addlist = new DataAcessLayer.employee_infomation();
          if (ds.Tables[0].Rows.Count > 0)
          {
              int row = ds.Tables[0].Rows.Count-1;
              for (int i = 0; i < ds.Tables[0].Select().Length; i++)
              {
          &


Ïà¹ØÎĵµ£º

ÔÚasp.netÖÐʹÓÃsession³£¼ûÎÊÌ⼯½õ

ÎÊ£ºÎªÊ²Ã´SessionÔÚÓÐЩ»úÆ÷ÉÏż¶û»á¶ªÊ§£¿
´ð£º¿ÉÄܺͻúÆ÷µÄ»·¾³ÓйØϵ£¬±ÈÈ磺·À»ðǽ»òÕßɱ¶¾Èí¼þµÈ£¬³¢ÊԹرշÀ»ðǽ¡£
ÎÊ£ºÎªÊ²Ã´µ±µ÷ÓÃSession.Abandonʱ²¢Ã»Óм¤·¢Session_End·½·¨£¿
´ð£ºÊ×ÏÈSession_End·½·¨Ö»Ö§³ÖInProc£¨½ø³ÌÄڵģ©ÀàÐ͵ÄSession¡£Æä´ÎÒª¼¤·¢Session_End·½·¨£¬±ØÐë´æÔÚSession£¨¼´ÏµÍ³ÖÐÒѾ­Ê¹Ó ......

asp.netµ¼Èëexcel

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

Asp.net(C#)ʵÏÖÑéÖ¤Â빦ÄÜ

н¨Ò»¸öרÃÅÓÃÀ´´´½¨ÑéÖ¤ÂëͼƬµÄÒ³ÃæValidateCode.aspx
ËüµÄºǫ́csÎļþ´úÂëÈçÏ£º
PageLoad
private void Page_Load(object sender, System.EventArgs e)
{
string checkCode = CreateRandomCode(4);
Session["CheckCode"] = checkCode;
CreateImage(checkCode);
......

asp.netÉÏ´«Í¼Æ¬»ã×Ü

1 ʹÓñê×¼HTMLÀ´½øÐÐͼƬÉÏ´«
ǰ̨´úÂ룺
<body> 
    <form id="form1" runat="server"> 
    <div> 
        <table> 
       &nbs ......

asp.netÉú³É¾²Ì¬Ò³Ã棨¾²Ì¬Ò³ÃæÖаüÀ¨ÓÐʵʱÐÅÏ¢£©

    asp.netÉú³É¾²Ì¬Ò³Ãæͨ³£»áÓÐ2Öз½Ê½£¬Ò»ÖÖÊÇα¾²Ì¬£¬Ò»ÖÖÊÇÊÂÏÈдºÃÄ£°åÈ»ºóÖ±½ÓÌæ»»ÄÚÈÝ¡£¶ÔÓÚ2ÖÖ·½Ê½µÄÓÅȱµã£¬Ôڴ˲»ÌÖÂÛ£¬ÖصãÊÇ˵ϵڶþÖÖ·½Ê½£¬ÔÚÉú³É¾²Ì¬Ò³ÃæÖÐÓÐһЩÐÅÏ¢ÐèҪʵʱ´ÓÊý¾Ý¿â¶ÁÈ¡£¨±ÈÈ磺ÔÚÐÂÎÅÒ³Ã棬ÎÒÃÇ»áÐèҪһЩÈȵãÅÅÐУ¬ÕâЩÈȵãÐÂÎÅÎÒÃǾÍÐèҪʵʱµÄ´ÓÊý¾Ý¿âÀï±ßÄõ½£©¡£
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ