asp.net¶ÁÈ¡EXcelµÄСÌÖÂÛ
ÔÚCSÎļþÖУ¬Ê×ÏÈÔÚ¶¥²¿ÒýÈë²Ù×÷ExcelÊý¾ÝµÄÃüÃû¿Õ¼ä
using System.Data.OleDb;
Õýʽ´úÂëÈçÏ£º
private void Button_Click(object sender, System.EventArgs e)
{
string thefullname = this.uploadFile.PostedFile.FileName;//»ñÈ¡ÍêÕû·¾¶
ClientScriptManager csm = Page.ClientScript;
if (thefullname == "")
{
csm.RegisterStartupScript(GetType, "Error", "alert('ÇëÑ¡ÔñÒªÉÏ´«µÃExcelÎļþ');", true);
return;
}
int fileLength = this.uploadFile.PostedFile.ContentLength;
if (fileLength > 512000)
{
csm.RegisterStartupScript(GetType, "Error", "alert('ÎļþÒѳ¬¹ý500K£¬ÎÞ·¨ÉÏ´«£¡');", true);
return;
}
FileInfo info = new FileInfo(thefullname);
string fileExt = info.Extension;
if (fileExt.ToLower() != ".xls")
{
csm.RegisterStartupScript(GetType, "Error", "alert('²»ÊÇExcelÎļþ£¬ÇëʹÓÃÕýÈ·µÄÎļþ¸ñʽ£¡');", true);
return;
}
string uploadPath = Page.MapPath(@"uploadfile\report.xls");
 
Ïà¹ØÎĵµ£º
ʹÓà ASP.NET TreeView ¿Ø¼þ¿ÉÒÔÇáËɵذ󶨵½Ö§³Ö IHierarchicalDataSource ½Ó¿ÚµÄÊý¾ÝÔ´£¬ÀýÈ磺XmlDataSource ÀàºÍ SiteMapDataSource Àà¡£´ËÍ⣬Äú»¹¿ÉÒÔÍêÈ«¿ØÖƽ«Êý¾ÝÔ´µÄÄÄЩ×Ö¶ÎÓÃÓÚ Text¡¢Value ºÍÆäËû TreeNode ÊôÐÔ¡£
Ò»¡¢°ó¶¨µ½ XML Îļþ
TreeView ¿Ø¼þÖ§³Öµ½ XML ......
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("/*\n------Êä³ö½á¹û------------");
getSplit("ABCDEFG"); ......
³ö´¦£º Ì켫yesky ×÷ÕߣºÖìÏÈÖÒ±àÒë ʱ¼ä£º2006-11-15 11:26:00
ÔÚз¢ÐеÄASP.NET 2.0°æ±¾ÖУ¬Î¢Èí²»ÔÙ½¨ÒéʹÓÃSystem.Web.MailÃüÃû¿Õ¼ä¶ø´úÖ®ÒÔеÄSystem.Net.MailÃüÃû¿Õ¼ä¡£ÔÚÕâ¸öпâÖÐÒýÈëÁËÐí¶àÐÂÌØÕ÷£¬µ«ÊÇÔÚ·¢ËÍÓʼþµÄ·½Ê½·½ÃæÒ²ÏàÓ¦µØ´øÈëÁËһЩС´íÎó¡£
Ò»¡¢ ·¢ËÍÓʼþ
ÔÚÏêϸÌÖÂÛÕ ......
³ö´¦£ºCSDN BLOG ×÷ÕߣºBrookes ʱ¼ä£º2006-12-5 14:12:00
ÔÚASPÖУ¬¾Í¿ÉÒÔͨ¹ýµ÷ÓÃCDONTS×é¼þ·¢Ëͼòµ¥Óʼþ£¬ÔÚASP.NetÖУ¬×ÔȻҲ¿ÉÒÔ¡£²»Í¬µÄÊÇ£¬.Net FrameworkÖУ¬½«ÕâÒ»×é¼þ·â×°µ½ÁËSystem.Web.MailÃüÃû¿Õ¼äÖС£ Ò»¸öµäÐ͵ÄÓʼþ·¢ËͳÌÐòÈçÏ£º
MailMessage mail=new MailMessage(); ......