ÔÚ Linux ÏÂÔËÐÐ ASP.NET 2.0
µ¥Î»ÓÐһ̨ÏÐÖÃµÄ¾É IBM Netfinity 7000 µÄ·þÎñÆ÷£¬Ë« Pentium Pro 200 MHz CPU£¬512 MB Äڴ棬һ¸ö 9.1 GB ºÍÎå¸ö 4.5 GB µÄ SCSI Ó²ÅÌ¡£ÎÒÏ뽫Æä·ÏÎïÀûÓÃһϣ¬ÓÚÊÇ£º
1. µ½ http://tw.releases.ubuntu.com/edgy/ ÏÂÔØ PC (Intel x86) server install CD £¬½«ÏÂÔصõ½µÄ ubuntu-6.10-server-i386.iso Îļþ¿Ì¼һÕŹâÅÌ¡£
2. ÓÃÕâÕŹâÅÌÔÚ IBM Netfinity 7000 ·þÎñÆ÷ÉÏ°²×° Ubuntu 6.10 (Edgy) ¡£
3. °²×° Apache2:
sudo apt-get install apache2
4. °²×°»ù±¾µÄ±àÒë»·¾³:
sudo apt-get install build-essential checkinstall
5. °²×° libapache2-mod-mono:
×î¼òµ¥µÄ·½·¨¾ÍÊÇʹÓÃÒÔÏÂÃüÁî:
sudo apt-get install libapache2-mod-mono
µ«ÊÇÄ¿Ç°ÔÚ Ubuntu 6.10 ÖÐÕâÌõÃüÁî»á±¨´í¡£Ö»ºÃ×Ô¼º±àÒëÒ»¸öÁË£º
md src
cd src
sudo apt-get install apache2-threaded-dev mono-xsp2 mono-apache-server mono-apache-server2
wget http://go-mono.com/sources/mod_mono/mod_mono-1.2.1.tar.gz
tar xzf mod_mono-*.tar.gz
cd mod_mono-*/
./configure --prefix=/usr --sysconfdir=/etc
make
sudo checkinstall
6. ÅäÖà Apache2 ÒÔ±ãÔËÐÐ ASP.NET 2.0
cd /etc/apache2/mods-available
sudo ln -s ../mod_mono.conf mod_mono.conf
sudo echo "LoadModule mono_module /usr/lib/apache2/modules/mod_mono.so" > mod_mono.load
sudo a2enmod mod_mono
cd ../sites-available
sudo vim ben.skyiv.com Çë²Î¿¼ default ÎļþµÄÄÚÈÝ£¬¹Ø¼üÊǼÓÈëÒÔÏÂÓï¾ä:
# -------------------------------------------------
Alias /ben /home/ben/www/ben
AddMonoApplications ben "/ben:/home/ben/www/ben"
MonoServerPath ben /usr/bin/mod-mono-server2
<Location /ben
Ïà¹ØÎĵµ£º
ÔÚASP.NETÍøÕ¾ÖÐÍøÕ¾¹ÜÀíºǫ́ÐèÒª¾³£ÑéÖ¤Óû§Éí·Ý,ҪʵÏÖÕâÖÖ¹¦ÄܾͿÉÒÔÀûÓÃÄǸö¼Ì³Ð»úÖƺÍASP.NETµÄʼþ»úÖÆ.Ê×Ïȶ¨ÒåÒ»¸öÐèÒª½øÐÐÉí·ÝÑéÖ¤µÄBasePageÀà,¼Ì³Ð×ÔPageÀà,ÔÚBasePageÀàµÄ¹¹Ô캯ÊýÖж¨ÒåËüµÄ¼ÓÔØʼþµÄ´¦Àí´úÂë,ÕâÑùËùÓм̳Ð×ÔBasePageÀàµÄÒ³Ã涼ÄÜ×Ô¶¯Ö´ÐÐÉí·ÝÑéÖ¤.
/// <summary>
/// ÑéÖ¤ ......
Ò»¡¢ÑéÖ¤Àà
1¡¢Êý×ÖÑéÖ¤ÄÚ
1.1 ÕûÊý
/^(-|\+)?\d+$/.test(str)
1.2 ´óÓÚ0µÄÕûÊý £¨ÓÃÓÚ´«À´µÄIDµÄÑéÖ¤)
/^\d+$/.test(str) &nb ......
´ó¼Ò»áÔÚASP.NET 2.0ʹÓÃTreeView¿Ø¼þʱ·¢ÏÖ´øÓÐCheckBox¿Ø¼þµÄTreeNode¶ÔÏó£¨TreeView½Úµã£©£¬Ñ¡ÔñCheckBoxÎÞ·¨»Ø·¢Ò³Ãæ¡£ÔÚMSDNÖжÔÓÚTreeView.TreeNodeCheckChangedʼþÓÐÒ»¶Î±¸×¢£º“µ± TreeView ¿Ø¼þµÄ¸´Ñ¡¿òÔÚÁ½´ÎÏò·þÎñÆ÷·¢ËÍÖ®¼ä¸ü¸Ä״̬ʱ£¬»áÒý·¢ TreeNodeCheckChanged ʼþ¡£ÕâʹÄú¿ÉÒÔÌṩһ¸öÕâÑùµÄʼþ´ ......
ÔÎÄ£ºÁõÎä|asp.netÖÐcookieµÄ´¦Àí
ʹÓÃÖз¢ÏÖÓÃRequest.Cookies.Remove()ÎÞ·¨É¾³ýcookie,googleÁËһϷ¢ÏÖÒ»°ãÊÇͨ¹ý½«¹ýÆÚʱ¼äÉèÖóɹýÈ¥µÄʱ¼äÀ´Íê³Éɾ³ýµÄ¡£Ë³±ãÕûÀíÏÂcookieµÄ²Ù×÷£º
Ò» ´´½¨
1 µ¥ÖµµÄ´´½¨
C#-Code:
HttpCookie hc = new HttpCookie("Value");
hc.Value = "value";
Response.Appe ......
using System;
using System.Text;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
& ......