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++)
{
&
Ïà¹ØÎĵµ£º
1.½«flex±àÒëºóµÄ³ÌÐò²åÈëµ½asp.netÒ³Ãæ
flexµÄ×îÖÕÊä³ö¾ÍÊÇÒ»ÕÅÍøÒ³+Ò»¸öflash(.swfÎļþ)
Õâô˵ÄãÃ÷°×Á˰ɣ¬Æäʵ¾ÍÊÇÓÃËûÉú³ÉµÄÍøÒ³µÄ·½Ê½°ÑÄǸö.swfÎļþ²åÈëµ½ÄãµÄasp.netÒ³Ãæ¾Í¿ÉÒÔÁË¡£
¼ÙÈçÄãµÄflex3ÏîÄ¿Ãû×Ö½ÐTestApp£¬×î¼òµ¥Ö±½ÓµÄ°ì·¨¾ÍÊÇ£¬
°Ñ"bin-debug"Ŀ¼Ïµģº
TestApp.html
TestApp.swf
AC_OETags.js ......
Ò»¡¢×Ô¶¨Òå FCKeditor µÄ BasePathBasePath ¼´FCKeditorÔÚÍøÕ¾ÖеÄÏà¶Ô·¾¶£¬Ä¬ÈÏÖµÊÇ /fckeditor/£¬×îºÃÔÚWeb.config appSettingsÖÐ¶ÔÆä½øÐÐÅäÖãº
<add key="FCKeditor:BasePath" value="/FCKeditor_2.6.3/"/>
ÕâÑù×öÓÐÖî¶àÓŵ㣺
1.¿ª·¢»·¾³ÓëÉú²ú»·¾³²»Í¬£¬¿ª·¢»·¾³Ò»°ãÊÇhttp://localhost/xxx.com/ÕâÖÖÇé¿öÏ ......
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
/// <summary>
/// Data ......
1 ʹÓñê×¼HTMLÀ´½øÐÐͼƬÉÏ´«
ǰ̨´úÂ룺
<body>
<form id="form1" runat="server">
<div>
<table>
&nbs ......
1. Êý¾Ý¿âµÄ²¿Êð
£¨1£©Èí¼þµÄ°²×°
A. MySql——±ØÐë°²×°ÔÚCÅÌÏ£¬·ñÔò°²×°mysql-connector-net-6.2.2ºóÎÞÕýÈ·ÅäÖÃ
B. mysql-connector-net-6.2.2——½«MySql.Data.dll·ÅÔÚBinÎļþ¼ÐÏÂ
£¨2£©Êý¾Ý¿âµÄµ¼³öµ¼Èë
MySQL-FrontµÄ"Áí´æÎª"¹¦ÄÜ¿ÉÒÔ½«Êý¾Ý¿âµ¼³öΪ.sqlÎļþ£¬È»ºóÔÙͨ¹ýËüÖ±½Óµ¼Èë.sqlÎļþ¿ ......