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

ASP.NETÖÐExcel²Ù×÷ÀàC#°æ

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 Microsoft.Office.Interop;
using Microsoft.Office.Core;
namespace ExcelEdit
{
/// <summary >
/// ExcelEdit µÄժҪ˵Ã÷
/// </summary >
public class ExcelEdit
{
public string mFilename;
public Excel.Application app;
public Excel.Workbooks wbs;
public Excel.Workbook wb;
public Excel.Worksheets wss;
public Excel.Worksheet ws;
public ExcelEdit()
{
//
// TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼­
//
}
public void Create()//´´½¨Ò»¸öExcel¶ÔÏó
{
app = new Excel.Application();
wbs = app.Workbooks;
wb = wbs.Add(true);
}
public void Open(string FileName)//´ò¿ªÒ»¸öExcelÎļþ
{
app = new Excel.Application();
wbs = app.Workbooks;
wb = wbs.Add(FileName);
//wb = wbs.Open(FileName, 0, true, 5, " ", " ", true, Excel.XlPlatform.xlWindows, "\t ", false, false, 0, true,Type.Missing,Type.Missing);
//wb = wbs.Open(FileName,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Excel.XlPlatform.xlWindows,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing);
mFilename = FileName;
}
public Excel.Worksheet GetSheet(string SheetName)//»ñÈ¡Ò»¸ö¹¤×÷±í
{
Excel.Worksheet s = (Excel.Worksheet)wb.Worksheets[SheetName];
return s;
}


Ïà¹ØÎĵµ£º

asp.net(c#)ÍøÒ³ÌøתÆßÖÖ·½·¨

1.Response.Redirect("http://www.jb51.net",false);
Ä¿±êÒ³ÃæºÍÔ­Ò³Ãæ¿ÉÒÔÔÚ2¸ö·þÎñÆ÷ÉÏ£¬¿ÉÊäÈëÍøÖ·»òÏà¶Ô·¾¶¡£ºóÃæµÄboolֵΪÊÇ·ñÍ£Ö¹Ö´Ðе±Ç°Ò³¡£
ÌøתÏòеÄÒ³Ã棬ԭ´°¿Ú±»´úÌæ¡£"
ä¯ÀÀÆ÷ÖеÄURLΪз¾¶¡£
:Response.Redirect·½·¨µ¼ÖÂä¯ÀÀÆ÷Á´½Óµ½Ò»¸öÖ¸¶¨µÄURL¡£µ±Response.Redirect()·½·¨± ......

ASP.NET ²Ù×÷MySQLÊý¾Ý¿âµÄ·½·¨ËµÃ÷

using System;
using System.Data;
using System.Diagnostics;
using System.Collections.Generic;
using MySql.Data.MySqlClient;
namespace System
{
 /// <summary>
 /// Description of MySqlDBUtil.
 /// </summary>
 public class MySqlDBUtil
 {
  &nbs ......

¹ØÓÚASP.NET/C#ÖжÔCookieµÄ²Ù×÷

дcookie
¡¡¡¡1 HttpCookie cookie = new HttpCookie("Info");//¶¨Òåcookie¶ÔÏóÒÔ¼°ÃûΪInfoµÄÏî
¡¡¡¡2 DateTime dt = DateTime.Now;//¶¨Òåʱ¼ä¶ÔÏó
¡¡¡¡3 TimeSpan ts=new TimeSpan(1,0,0,0);//cookieÓÐЧ×÷ÓÃʱ¼ä£¬¾ßÌå²émsdn
¡¡¡¡4 cookie.Expires = dt.Add(ts);//Ìí¼Ó×÷ÓÃʱ¼ä
¡¡¡¡5 cookie.Values.Add("user","cx ......

ASP.NET×Ô¶¨Òå´íÎóÒ³Ãæ

ASP.NET ÌṩÈýÖÖÓÃÓÚÔÚ³öÏÖ´íÎóʱ²¶»ñºÍÏìÓ¦´íÎóµÄÖ÷Òª·½·¨£ºPage_Error ʼþ¡¢Application_Error ʼþÒÔ¼°Ó¦ÓóÌÐòÅäÖÃÎļþ (Web.config)¡£
Èç¹ûÄú²»µ÷Óà Server.ClearError »òÕß²¶»ñ Page_Error »ò Application_Error ʼþÖеĴíÎó£¬Ôò½«¸ù¾Ý Web.config ÎļþµÄ <customErrors> ²¿·ÖÖеÄÉèÖô¦Àí´íÎó¡£ÔÚ <cus ......

Asp.net ¶Ô·¾¶¡°***¡±µÄ·ÃÎʱ»¾Ü¾ø

Asp.netÍøÕ¾·¢²¼µ½IISÉÏ£¬²Ù×÷ÎļþµÄʱºò·¢Éú‘System.UnauthorizedAccessException:¶Ô·¾¶“***”µÄ·ÃÎʱ»¾Ü¾ø’¡£
˵Ã÷ûÓÐÊÚÓèAsp.net¶ÔÎļþµÄд·ÃÎÊȨ£¬ÍøÉÏÕÒÁËÒ»ÏÂ:
ÈôÒªÊÚÓè ASP.NET ¶ÔÎļþµÄд·ÃÎÊȨ£¬ÇëÔÚ×ÊÔ´¹ÜÀíÆ÷ÖÐÓÒ»÷¸ÃÎļþ£¬Ñ¡Ôñ“ÊôÐÔ”£¬È»ºóÑ¡Ôñ“°²È«”Ñ¡Ïî¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ