Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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±éÀú¿Ø¼þµÄ¼¸ÖÖ·½·¨

·½·¨Ò»:javascript·¨ function btnClear() { for(i=0;i /// Çå¿ÕÖ¸¶¨Ò³ÃæÉÏËùÓеĿؼþÄÚÈÝ£¬°üÀ¨TextBox£¬CheckBox,CheckBoxList,RadioButton,RadioButtonList¡£µ«ÊDz»Çå /// ³ýÈçListBox£¬DropDownList£¬ÒòΪÕâÑùµÄ¿Ø¼þÖµ¶Ôµ±Ç°Ò³ÃæÀ´Ëµ»¹¿ÉÒÔÓã¬Ò»°ãÕâЩ¿Ø¼þÀï¶¼ÊDZ£´æµÄ×ÖµäÊý¾Ý¡£ /// Author£ºKevin /// ÈÕÆÚ£º2004-12 ......

asp.net ͼƬˮӡ

string mapho = request["imgpath"];//»ñȡij¸öÒ³Ãæ´«¹ýµÄͼƬÃû³Æ
  string str1 = Server.MapPath(mapho);//ÒªÌí¼ÓˮӡµÄͼƬ
  string str2 = Server.MapPath("WaterMark.jpg");//Ìí¼ÓµÄÄÚÈÝͼƬ
  System.Drawing.Image bmp = System.Drawing.Image.fromFile(str1);
  Graphics gs = Graphics. ......

ASP.NETÓëMySqlµÄÁ¬½Ó——Êý¾Ý¿â·ÃÎʲÙ×÷

1.¶Á³ö·½Ê½
DataReaderºÍDataSet¶¼¿ÉÒÔʵÏÖ¶ÔÊý¾Ý¿âÊý¾ÝµÄ²éѯ·µ»Ø£¬µ«Ç°ÕßÖ»ÄÜÌṩ¿ìËٵIJéѯ·½Ê½£¬ºóÕß»¹¿ÉÒÔʵÏÖ¶ÔÊý¾ÝµÄÌí¼Ó¡¢Ð޸ġ¢É¾³ý¹¦ÄÜ¡£
£¨1£©DataReader·½Ê½¶ÁÈ¡£º
string sConnString = "server=localhost;User Id=root;password=root;Persist Security Info=True;database=db_user";
MySqlConnection myC ......

ASP.NET2005 ÉèÖÃGridView±íÍ·µÄ±³¾°Í¼Æ¬


×î½üÔÚ×öÒ»¸öÍøÕ¾£¬ÏÔʾÊý¾ÝʱΪÁË·½±ãʹÓÃÁËGridView¡£ËäÈ»GridViewÏÔʾÊý¾ÝµÄ¹¦ÄܺÜǿҲºÜ·½±ã£¬µ«ËüµÄÑùʽȴ²¢²»ÃÀ¹Û¡£ÎªÁËʹGridViewµÄÏÔʾÑùʽÃÀ¹ÛһЩ£¬¾­³£ÐèÒªÉèÖñíÍ·µÄ±³¾°£¬ÎÒ×ܽá³öµÄ·½·¨ÈçÏ£º
·½·¨Ò»£º
ÔÚGridViewµÄOnRowDataBoundʼþÖÐÉèÖñ³¾°£¬´úÂëÈçÏ£º
protected void GridView1_RowDataBound(ob ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ