asp.NET ÈçºÎÉú³ÉDLLÎļþ£¬²¢µ÷ÓÃ
ʹÓÃcscÃüÁ.csÎļþ±àÒë³É.dllµÄ¹ý³Ì
ºÜ¶àʱºò,ÎÒÃÇÐèÒª½«.csÎļþµ¥¶À±àÒë³É.dllÎļþ, ²Ù×÷ÈçÏÂ:
´ò¿ªÃüÁî´°¿Ú->ÊäÈëcmdµ½¿ØÖÆ̨->cd C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
תµ½vs.net°²×°µÄ¸ÃĿ¼ÏÂ->Ö´ÐÐcscÃüÁîcsc /target:library File.cs->ÔÚ¸ÃĿ¼Ï²úÉúÒ»¸ö¶ÔÓ¦Ãû×ÖµÄ.dllÎļþ(Ç°Ìá:°Ñ.csÎļþ·Åµ½C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322Ŀ¼ÏÂ)
cscÃüÁîµÄ·½Ê½ºÜ¶à,Çë²Î¿¼ÒÔÏÂ
Òë File.cs ÒÔ²úÉú File.exe
csc File.cs ±àÒë File.cs ÒÔ²úÉú File.dll
csc /target:library File.cs ±àÒë File.cs ²¢´´½¨ My.exe
csc /out:My.exe File.cs ͨ¹ýʹÓÃÓÅ»¯ºÍ¶¨Òå DEBUG ·ûºÅ£¬±àÒ뵱ǰĿ¼ÖÐËùÓÐµÄ C# Îļþ¡£Êä³öΪ File2.exe
csc /define:DEBUG /optimize /out:File2.exe *.cs ±àÒ뵱ǰĿ¼ÖÐËùÓÐµÄ C# Îļþ£¬ÒÔ²úÉú File2.dll µÄµ÷ÊÔ°æ±¾¡£²»ÏÔʾÈκλձêºÍ¾¯¸æ
csc /target:library /out:File2.dll /warn:0 /nologo /debug *.cs ½«µ±Ç°Ä¿Â¼ÖÐËùÓÐµÄ C# Îļþ±àÒëΪ Something.xyz£¨Ò»¸ö DLL£©
csc /target:library /out:Something.xyz *.cs ±àÒë File.cs ÒÔ²úÉú File.dll
csc /target:library File.csÕâ¸ö¾ÍÊÇÎÒÃÇʹÓÃ×î¶àµÄÒ»¸öÃüÁÆäʵ¿ÉÒÔ¼òµ¥µÄд³Écsc /t:library File.cs£¬ÁíÍâµÄÒ»¸öд·¨ÊÇ csc /out:mycodebehind.dll /t:library mycodebehind.cs£¬Õâ¸ö¿ÉÒÔ×Ô¼ºÖ¸¶¨Êä³öµÄÎļþÃû¡£
csc /out:mycodebehind.dll /t:library mycodebehind.cs mycodebehind2.cs£¬Õâ¸öµÄ×÷ÓÃÊÇ°ÑÁ½¸öcsÎļþ×°µ½Ò»¸ö.dllÎļþÀï
¾ÙÀý(ÕªÓÚÍøÂç)
Ò»¡¢ ¶¯Ì¬Á´½Ó¿â
ʲôÊǶ¯Ì¬Á´½Ó¿â£¿DLLÈý¸ö×Öĸ¶ÔÓÚÄãÀ´ËµÒ»¶¨ºÜÊìϤ°É£¬ËüÊÇDynamic Link Library µÄËõдÐÎʽ£¬¶¯Ì¬Á´½Ó¿â (DLL) ÊÇ×÷Ϊ¹²Ïíº¯Êý¿âµÄ¿ÉÖ´ÐÐÎļþ¡£¶¯Ì¬Á´½ÓÌṩÁËÒ»ÖÖ·½·¨£¬Ê¹½ø³Ì¿ÉÒÔµ÷Óò»ÊôÓÚÆä¿ÉÖ´ÐдúÂëµÄº¯Êý¡£º¯ÊýµÄ¿ÉÖ´ÐдúÂëλÓÚÒ»¸ö DLL ÖУ¬¸Ã DLL °üº¬Ò»¸ö»ò¶à¸öÒѱ»±àÒë¡¢Á´½Ó²¢ÓëʹÓÃËüÃǵĽø³Ì·Ö¿ª´æ´¢µÄº¯Êý¡£DLL »¹ÓÐÖúÓÚ¹²ÏíÊý¾ÝºÍ×ÊÔ´¡£¶à¸öÓ¦ÓóÌÐò¿Éͬʱ·ÃÎÊÄÚ´æÖе¥¸ö DLL ¸±±¾µÄÄÚÈÝ¡£
¡¡¡¡ºÍ´ó¶àÊý³ÌÐòÔ±Ò»Ñù£¬ÄãÒ»¶¨ºÜʹÓùýDLL°É¡£Ò²Ôø¸ÐÊܵ½ËüµÄ´ø¸øÄã³ÌÐòÉè¼ÆºÍ±àÂëÉϵĺôí°É½ñÌìÎÒÏëºÍ´ó¼Ò̽ÌÖÒ»¸öÖ÷Ì⣺ÈçºÎÔÚC#´´½¨ºÍµ÷ÓÃDLL(¶¯Ì¬Á´½Ó¿â), ÆäʵÔںܴóÒâÒåÉ϶ø½²£¬DLLÈÃÎÒ¸üÁé»îµÄ×éÖ¯±àдÎÒÃǵÄÓ¦ÓóÌÐò£¬×÷ΪÈí¼þÉè¼ÆÕߣ¬¿ÉÒ»¸ö¸ù¾ÝËüÀ´´ïµ½ºÜ¸ßµÄ´úÂëÖØÓÃЧ¹û¡£ÏÂÃæÎÒÀ´
Ïà¹ØÎĵµ£º
ת×Ôhttp://martinyang2010.bokee.com/2598999.html
using System;
using System.Data;
using System.Drawing;
using System.Data.SqlClient;
using Excel;
using Word;
using System.IO;
namespace Common
{
/// <summary>
/// °ÑÊý¾Ýµ¼Èëµ½.doc¡¢.txt¡¢.xlsÎļþÖÐ
/// </summary>
publi ......
1£¬±¾µØÉú³ÉµÄÎļþÏòIIS¹«¿ªµÄ·¾¶Öи´ÖÆ£¬ÓÐʱ»á·¢Éú°²È«´íÎó£¬ÕâÊÇÒòΪĿ±êÎļþ¼ÐÏ£¬Ã»ÓÐȨÏÞ£¬¿ÉÒÔ¿¼ÂÇÉèÖÃEveryoneȨÏÞ,µ«Çë½÷É÷ʹÓá£
2£¬LoadÒ³ÃæµÄʱºòÈç¹û·¢Éú “ûÓÐÕÒµ½Îļþ”ÕâÑùµÄ´íÎ󣬾ÍÐèÒª²é¿´ÄãдÈëǰ̨µÄ¸÷¸öÎļþ·¾¶ÊÇ·ñÕýÈ·£¬°üÀ¨Í¼Æ¬£¬CSSÎļþ£¬jsÎļþµÈµÈ¡£
3£¬ASP ÔÚLoadÒ³ÃæµÄ¹ý³Ì£¬Ê ......
[תÔØ]ÈçºÎ´ò¿ª±ðÈ˵ÄASP.netÏîÄ¿
ÈçºÎ´ò¿ª±ðÈ˵ÄASP.netÏîÄ¿2006-2-24 21:51:00
£¨1£©½«ÏîÄ¿Îļþ¼Ð¿½±´µ½Äã»úÆ÷µÄwwwrootĿ¼
£¨2£©ÔÚIIS½¨Á¢Ò»¸öÃû³ÆΪWebApplicationµÄÐéÄâĿ¼£¬Ö÷Ŀ¼É趨Ϊ C:\Inetpub\wwwroot ......
ÎÊÌâ:
ÓÃÓÚÔËÐÐ ASP.NET µÄ½ø³ÌÕÊ»§±ØÐë¾ßÓÐ¶Ô IIS ÔªÊý¾Ý¿â(Èç IIS://servername/W3SVC)µÄ¶Á·ÃÎÊȨ¡£
³öÏÖ´ËÎÊÌâ¶àÊÇÒòΪÏÈ×°.net frameworkºó×°IIS Ôì³É
½â¾ö·½·¨:
¿ªÊ¼->³ÌÐò->Microsoft .NET Framework SDK v2.0->SDK ÃüÁîÌáʾ
ÊäÈë
aspnet_regiis -i »Ø³µ
---OVER--- ......
ÕâÀï²»ÊÇÖ¸µ÷Óüòµ¥µÄ PageMethod£¬ÒòΪ¾²Ì¬·½·¨ÊDz»ÄܲÙ×÷µ±Ç°Ò³ÃæµÄ¿Ø¼þµÄ£¬ËùÒÔ¾²Ì¬µÄ PageMethod ×÷Óþ͸úÆÕͨµÄ WebService Ò»Ñù£¬±È½Ï¾ÖÏÞ¡£
ÄÇô£¬µ÷ÓÃÒ»°ãµÄ·þÎñÆ÷¶Ë·½·¨£¬Æäʵ¾ÍÊÇ·¢ÆðÒ»¸öÒì²½»Øµ÷¡£×î¼òµ¥µÄʵÏÖ°ì·¨£¬ÊÇͨ¹ý UpdatePanel À´×ö¡£
Ê×Ïȶ¨ÒåÒ»¸öÒþ²ØµÄ LinkButton£¬ÔÚÆä´¦ÀíʼþÖУ¬È¥µ÷ÓÃÎÒÃÇÒªÖ ......