ÔÚASP.Net 2.0ÖÐʵÏÖ¶àÓïÑÔ½çÃæµÄ·½·¨
¡¡1£® ¸úÒÔÇ°Ò»Ñù×ö½çÃ棬ֻÊÇ×¢Ò⣬°ÑËùÓÐÐèÒªÓжàÓïÑÔ½çÃæµÄÎÄ×Ö¶¼ÓÃlabelÀ´×ö
¡¡¡¡2£® ×öÍêÒÔºó£¬ÔÚSolution ExplorerÀïÑ¡ÖÐÕâ¸öÎļþ£¬Ñ¡Tools-£¾Generate Local Resource
¡¡¡¡3£® Äã»á·¢ÏÖÉú³ÉÁËÒ»¸öĿ¼£¬App_LocalResources£»Õâ¸öĿ¼Àï¶àÁËÒ»¸öresxµÄÎļþ¡£±ÈÈçÄãµÄaspxÎļþÊÇdefault.aspx£¬Ëü¾Í»áÉú³ÉÒ»¸ö½Ð×ödefault.aspx.resxµÄÎļþ¡£
¡¡¡¡4£® ´ò¿ªÕâ¸öÎļþ¿´¿´£¬ÔÀ´ÔÚlabelÖеÄÄÇЩÎÄ×Ö¶¼Åܵ½ÕâÀïÀ´ÁË
¡¡¡¡5£® ´ò¿ªÔÀ´µÄaspxÎļþ¿´¿´source£¬»á·¢ÏÖÔ´Âë±äÁË£º
£¼%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Default2" title="Untitled Page" Culture="auto" meta:resourcekey="PageResource1" UICulture="auto" %£¾
…………
£¼asp:Localize ID="Localize1" runat="server" meta:resourcekey="Localize1Resource1"£¾£¼/asp:Localize£¾
*********************************************************************
¡¡¡¡Èç¹ûÊÇÆäËûµÄ¿Ø¼þÉϵÄÎÄ×Ö£¬»ù±¾ÉÏÒ²ÊÇ»á×Ô¶¯Éú³ÉµÄ¡£±ÈÈçbuttonºÍgridviewµÄ£º
£¼asp:Button ID="Button1" runat="server" meta:resourcekey="Button1Resource1" Text="Button1" /£¾£¼br /£¾
£¼asp:GridView ID="GridView1" runat="server" meta:resourcekey="GridView1Resource1"£¾
£¼Columns£¾
£¼asp:BoundField HeaderText="Header1" meta:resourcekey="BoundFieldResource1" /£¾
£¼asp:BoundField HeaderText="Header2" meta:resourcekey="BoundFieldResource2" /£¾
£¼/Columns£¾
£¼/asp:GridView£¾
¡¡¡¡Éú³ÉµÄresourceÈçÏ£º
¡¡¡¡
¡¡¡¡ *********************************************************************
¡¡¡¡6£® ×¢ÒâÕâÀmeta:resourcekey="PageResource1" ºÍmeta:resourcekey="Localize1Resource1" Õâ¾Í±íʾÕâÀïµÄÎÄ×ÖÊÇ´Ó×ÊÔ´ÖжÁÈ¡µÄ¡£
¡¡¡¡7£® OKÏÖÔÚÀ´×öÁíÒ»ÖÖÓïÑÔµÄ×ÊÔ´Îļþ¡£ºÜ¼òµ¥£¬copy Default.aspx.resxÔÙpasteһϣ¬È»ºórenameΪDefault.aspx.fr-fr.resx×¢Òâfr-frÊÇÄãÒª×öµÄÓïÑÔµÄÃû×Ö¡£´ó¼ÒÈç¹û¿´dvdripµÄ»°£¬Ó¦¸Ã¾õµÃÕâ¸ú×ÖÄ»ÎļþºÜÏñ°É£¿
¡¡¡¡8£® ÓÐÈË˵ÎÒÔõô֪µÀÄǸöÓïÑÔ½ÐʲôÃû×ÖÄØ£¿ºÜ¼òµ¥£¬´ò¿ªie£¬tools-£¾internet options -£¾ languages -£¾ add£¬·½¿òÖмäµÄ¾ÍÊÇÁË¡£
¡¡¡¡9£® ÏÖÔÚ¿ªÊ¼±à¼ÆäËû×ÊÔ´µÄÎÄ×Ö¡£´ò¿ªDefault.aspx.fr-fr.resx£¬¶ÔÕÕ×ÅÔ
Ïà¹ØÎĵµ£º
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" & ......
ÔÚ¿ª·¢ISOÎļþ¹ÜÀíϵͳµÄʱºò£¬Ôø¾Óöµ½¹ýÒª½«ASPXÖ±½ÓÊä³öµ½EXCELµÄÐèÇó£¬ÏÖ½«¾ÑéËùµÃÓë´ó¼Ò·ÖÏí¡£ Æäʵ£¬ÀûÓÃASP.NETÊä³öÖ¸¶¨ÄÚÈݵÄWORD¡¢EXCEL¡¢TXT¡¢HTMµÈÀàÐ͵ÄÎĵµºÜÈÝÒ׵ġ£Ö÷Òª·ÖΪÈý²½À´Íê³É¡£
¡¡¡¡Ò»¡¢¶¨ÒåÎĵµÀàÐÍ¡¢×Ö·û±àÂë
Response.Clear();
Response.Buffer= true;
Response ......
(Ò»).Ñ¡Ôñ»á»°×´Ì¬´æ´¢·½Ê½
ÔÚWebconfigÎļþÅäÖÃ:
<sessionState mode="???" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=y ......
Model-View-Controller (MVC) ¼Ü¹¹Ä£Ê½½«Ò»¸öÓ¦ÓóÌÐò·ÖΪÈý¸ö×é³É²¿·Ö:Ä£ÐÍ£¬ÊÓͼÓë¿ØÖÆÆ÷¡£ASP.NET MVC¿ò¼ÜΪ´´½¨»ùÓÚMVCµÄWebÓ¦ÓóÌÐòÌṩÁËÒ»ÖÖÌæ´ú·½°¸¡£ASP.NET MVC¿ò¼ÜÊÇÒ»¸öÇáÁ¿¼¶µÄ£¬¿É¸ß¶È²âÊÔµÄչʾ¿ò¼Ü£¨»ùÓÚWeb´°ÌåµÄÓ¦ÓóÌÐò£©£¬Ëü¼Ì³ÐÁËÏÖÓеÄASP.NETÌØÐÔ£¬±ÈÈçĸ°æÒ³ºÍ³ÉÔ±×ʸñȨÏÞ¡£ MVC¿ò¼Ü¶¨Ò ......
ASP.NET3.5¿ÉÒԺܼò´ðµÄʵÏÖÒ»¸öºÜÓÐÓõŦÄÜ£¬¼È¿çÒ³Ãæ´«ËÍ£¬
´«Í³µÄÌá½»´°ÌåÖ»»á½«´°ÌåÌá½»¸øËü×Ô¼º¡£¶ø¿çÒ³ÃæµÄÌá½»£¬
»á½«page1µÄÄÚÈÝ´«Ë͸öpage2£¬²¢ÔÚpage2ÖÐʹÓÃpage1ÖеĿؼþ¡£
¢Ù ¿çÒ³Ãæ´«µÝµÄ¼òµ¥ÊµÏÖ
Ò³ÃæÒ»£¨Default.aspx£©ÖеĿؼþ
<a ......