asp.net FckeditorÅäÖÃ
Ò»¡£ÏÂÔص¼ÈëÏîÄ¿
£¨1£©Ê×Ïȵ½http://ckeditor.com/downloadÏÂÔØFCKeditor 2.6.5,ºÍFCKeditor.Net 2.6.3,
È»ºó½âѹÕâÁ½¸öÎļþ¼Ð
FCKeditor±à¼Æ÷£¬µÃµ½Îļþ¼Ðfckeditor£¬¸´ÖÆ´ËÎļþ¼Ðµ½WebÓ¦ÓõÄÏîÄ¿Ï£¨Ò²¿ÉÒÔÊÇ×ÓËïĿ¼Ï£©¡£
½âѹFCKeditor¿Ø¼þ£¬ÔÚÆä×ÓĿ¼bin/Release/2.0ÏÂÓÐÒ»¸ö³ÌÐò¼¯¡£ÔÚWebÓ¦ÓõÄÏîÄ¿ÖÐÒýÓøóÌÐò¼¯¡£
£¨2£©¼¯³Éµ½Visual Studio¹¤¾ßÏä
´ò¿ªÒ»ASP.NETÒ³Ã棬չ¿ªToolbox£¬´ò¿ªÓÒ¼ü²Ëµ¥£¬Ñ¡Ôñ“Choose Items ...”£¬ÔÚ³öÏֵēChoose Toolbox Items”»á»°¿òµÄ“.NET Framework Components”Ñ¡ÏÖÐÑ¡Ôñ“Browse”£¬ÕÒµ½²¢Ñ¡ÖÐFCKeditor³ÌÐò¼¯£¬´ò¿ªºó»Øµ½“Choose Toolbox Items”´°¿Ú£¬µã»÷“OK”£¬Íê³É¿Ø¼þµ¼Èë¡£
Õâʱ£¬ÔÚToolboxµÄGeneral·ÖÀàϳöÏÖÁËÒ»¸öÃûΪFCKeditorµÄ¿Ø¼þ£¬¿ÉÒÔÏñʹÓÃVisual StudioÄÚÖÿؼþÒ»ÑùʹÓÃËü¡£
£¨3£©½«FCKeditor±à¼Æ÷Îļþ×éASP.NET»¯
FCKeditor±à¼Æ÷Îļþ×é°üº¬ÁËÓÃÓÚËüËùÖ§³ÖµÄ¸÷ÖÖÓ¦Óü¼ÊõµÄÎļþ£¬ËùÒÔ£¬¶ÔÓÚASP.NETÓ¦ÓÃÀ´Ëµ£¬ÓкܶàÎļþÊDz»ÐèÒªµÄ¡£
¸ùĿ¼Ï£¬Ö»±£ÁôÎļþ¼Ðeditor£¬Îļþfckconfig.js¡¢fckeditor.js¡¢fckpackager.xml¡¢fckstyles.xmlºÍfcktemplates.xml¡£
×ÓĿ¼editor/filemanager/connectorsÏ£¬Ö»±£ÁôÎļþ¼Ðaspx¡£
¶þ¡£web.configÅäÖãº
ÔÚÒ³ÃæÖУ¬Ê¹ÓõÄÊÇFCKeditor¿Ø¼þ£¬¸Ã¿Ø¼þÐèÒªÖªµÀFCKeditor±à¼Æ÷Îļþ×éµÄ·¾¶¡£ÓÐÁ½ÖÖÅäÖ÷½·¨¡£
ÔÚappSettingsÅäÖýÚÖмÓÈë
<add key="FCKeditor:BasePath" value="~/PathOfFCKeditor/" />
ʹÓÃÕâÖÖÅäÖ÷½·¨ºó£¬¶ÔÓÚÏîÄ¿ÖÐÈκÎÒ»¸öÒ³ÃæÖÐÓõ½µÄFCKeditor¿Ø¼þ£¬¶¼²»ÓÃÔÙÅäÖÃÆäBasePathÊôÐÔ¡£
Ö±½Ó¶ÔÓõ½µÄFCKeditor¿Ø¼þ½øÐÐÅäÖÃ
ÔÚÒ³Ãæ´úÂëÖÐÉèÖÃFCKeditorµÄÊôÐÔBasePathΪFCKeditor±à¼Æ÷Îļþ×éµÄ·¾¶£¬»òÕßÔÚPage_Initʼþ´¦ÀíÆ÷ÖÐÉèÖÃÆäBasePathµÄÖµ¡£
ÅäÖÃFCKeditor±à¼Æ÷ÎļþÉÏ´«Â·¾¶
ÔÚweb.configµÄappSettingsÅäÖýÚÖмÓÈë
<add key="FCKeditor:UserFilesPath" value="~/YourUploadFilePat
Ïà¹ØÎĵµ£º
1£¬SqlServer´æ´¢¹ý³ÌµÄÊÂÎñ´¦Àí
Ò»ÖֱȽÏͨÓõijö´í´¦ÀíµÄģʽ´ó¸ÅÈçÏ£º
Create procdure prInsertProducts
(
@intProductId int,
@chvProductName varchar(30),
@intProductCount int
)
AS
Declare @intErrorCode int
Select @intErrorCode=@@Error
Begin transaction
if @intError ......
ASP.NETÖ¸ÁîÔÚÿ¸öASP.NETÒ³ÃæÖж¼ÓС£Ê¹ÓÃÕâЩָÁî¿ÉÒÔ¿ØÖÆASP.NETÒ³ÃæµÄÐÐΪ¡£ÏÂÃæÊÇPageÖ¸ÁîµÄÒ»¸öÀý×Ó£º
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
ÔÚASP.NETÒ³Ãæ»òÓû§¿Ø¼þÖÐÓÐ11¸öÖ¸Áî¡£ÎÞÂÛÒ³ÃæÊÇʹÓúǫ́±àÂëÄ£ÐÍ»¹ÊÇÄÚÖñ ......
12 ASP.NET MVC Best Practices
M
DomainModel != ViewModel
Use ActionFilters for “shared” data
V
Do NEVER user code-behind
Write HTML each time you can
If there is an if, write an HtmlHelper
Choose your view engine carefully
C
Delete the AccountController
Isolate Controllers fro ......
ѧϰ×Ô¶¨Òå¿Ø¼þµÄ¿ª·¢²»½ö¿ÉÒÔʹÄ㿪·¢³ö¸üÁé»îµÄϵͳ¸üÖØÒªµÄÊÇËü¿ÉÒÔʹÄã¼ÓÉî¶ÔÒÑÓзþÎñÆ÷¿Ø¼þµÄÀí½â£¬µÃÒÔ¸üÁé»îµÄÓ¦Óá£
½ÏÖ®ÓÚasp£¬asp.netÌṩÁ˸üÇ¿´óµÄ¹¦ÄÜ£¬ÎұȽÏϲ»¶ËüµÄ´úÂë·ÖÀë¼¼ÊõºÍ¶ÔÖîÈçC#¡¢VB.NetµÈÇ¿ÀàÐÍÓïÑÔµÄʹÓã¬ÕâÊÇ´Ó¿ª·¢ÕߵĽǶÈÀ´¿´µÄ£¬´ÓÓû§µÄ½Ç¶ÈÀ´¿´£¬»á¾õµÃËüËٶȸü¿ì£¬ÔËÐиüÎȶ¨£¬ ......