[ת]Asp.net 2.0Ò³ÃæÑùʽ¶ªÊ§×ܽá
תÔØ×Ô¡¾ÃÏ×ÓEÕ¡¿£ºhttp://blog.csdn.net/net_lover/archive/2007/08/27/1760521.aspx
¾³£ÓÐÈËÓöµ½ASP.NET 2.0£¨ASP.NET 1.xÖпÉÄÜÊÇÓÐЧµÄ£©ÖÐCSSʧЧµÄÎÊÌ⣬ÏÖ½«Ö÷ÒªÔÒòºÍ½â¾ö·½·¨ÂÞÁÐÈçÏ£º
1.CSSÎļþ·¾¶²»ÕýÈ·
Õâ¸öÎÊÌâÊôÓÚWeb¿ª·¢ÖеĻù´¡ÎÊÌ⣬һ°ã²ÉÓÃÏà¶Ô·¾¶»á³öÏÖÕâÑùµÄÎÊÌ⣬»òÕßÑùʽÎļþдÔÚÁËĸ°æÒ³ÀïÃ棬ÔÚÄÚÈÝÒ³Óëĸ°æÒ³²»ÔÚͬһ¼¶Ä¿Â¼ÏÂʱ»á³öÏÖÕâÑùµÄÎÊÌâ¡£´ËʱÄãÒªÇå³þWebÖÐÏà¶Ô·¾¶µÄ¹æÔò£¬Èç¹ûÄã²»Çå³þ£¬¿ÉÒÔ²ÉÓþø¶Ô·¾¶µÄд·¨ÊÔÊÔ¾ÍÖªµÀÊDz»ÊÇ·¾¶µÄÎÊÌâÁË¡£
2.CSS¹æÔòд·¨´íÎó
Õâ¸öÎÊÌâËÒ²°ï²»Ä㣬ֻÄÜ×Ô¼ºÑ§Ï°CSSµÄÏà¹Ø֪ʶÁË¡£
3.Îļþ±àÂëÎÊÌâ
ÓÐʱºò£¬CSSÑùʽ·ÅÔÚaspxÎļþÀïÓÐЧ£¬¶ø·ÅÔÚ¶ÀÁ¢µÄÎļþÖÐÎÞЧ£¬ÕâÑùµÄÎÊÌâÈç¹û²»ÊÇ·¾¶ÎÊÌ⣬Ôò¾ÍÊDZàÂëÎÊÌâÔì³ÉµÄ£¬¿ÉÒÔ½«CSSÎļþÓüÇʱ¾´ò¿ª£¬ÔÙÁí´æΪANSI¸ñʽ»òÕßUTF-8¸ñʽ¼´¿É¡£
4.ȨÏÞÎÊÌâ
ÕâÖÖÇé¿ö³£¼ûµÄÏÖÏóÊǵǼ֮ǰÑùʽÎÞЧ£¬µÇ¼֮ºó²ÅÓÐЧ£¬ÕâÊǵäÐ͵ÄȨÏÞÎÊÌâÔì³ÉµÄ¡£ÓÉÓÚweb.configÅäÖÃÁËËùÓÐÎļþ²»ÔÊÐíÄäÃû·ÃÎÊ£¬²Å»á³öÏÖÕâÑùµÄÎÊÌ⣬½â¾ö·½·¨¾ÍÊǽ«<location>±ê¼Ç½«ÑùʽÎļþÅäÖÃΪÔÊÐíÄäÃû·ÃÎÊ¡£ÀýÈ磺
<configuration>
<location path="ÔÊÐíÄäÃû·ÃÎʵÄÎļþ¼ÐÃû³Æ»òÕßÎļþ·¾¶">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
</configuration>
5.µ¥»÷°´Å¥ÑùʽʧЧ
ÕâÖÖÇé¿ö×îµäÐ͵ÄÔÒòÊǵ¥»÷°´Å¥Ê¼þÀïÓÐÀàËÆResponse.WriteÕâÑùµÄÓï¾ä£¬ÓÉÓÚASP.NET 2.0ĬÈϲÉÓÃhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdÎĵµÀàÐͶ¨Ò壬Ëü¾ÍÒªÇóÔÚ<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">µÄÇ°Ãæ²»ÄÜÓÐÈκÎÊä³ö¡£ÕâÖÖÎÊÌâµÄ½â¾ö·½·¨ÊDzÉÓÃClientScriptManagerÊä³ö£¬»òÕß²ÉÓÃLiteral¿Ø¼þÊä³öÄÚÈÝ¡£
[תÔز¹³ä]
&nbs
Ïà¹ØÎĵµ£º
Ê×ÏÈÉêÃ÷ ´¿Êô¸öÈËÁ·Ï°Ö®×÷ ÇëÎðÓÃÓÚÉÌҵĿµÄ..........ÎÞÓï
¼ÍÄîÒ»ÏÂÎÒÒÔÇ°µÄÒ»¸ö×÷Æ·<¿ú>,ÒÔºó¾ÍÓÃËüµ±ÎÒµÄLOGOÁË
½ñÌìÊÇÊ×·¢,ÕâƪÎÄÕÂÎÒ»á³ÖÐø¸üÐÂ,ÎÒ²ÎÕÕÁËÔ°ÇøÀïÇ°±²µÄ¾Ñé,ÃþË÷×ÅȥʵÏÖ,Ä¿Ç°´óÌåµÄ»¹Î´ÍêÉÆ,ÏÈ·¢ÕÅͼÉÏÀ´...
......
ÔÚʹÓÃAJAX½øÐгÌÐò¿ª·¢µÄʱºò£¬Ò»Ö±¶¼»áÃæ¶ÔÒ»¸ö»º´æµÄÎÊÌ⣡£¡
¼´ÊÇ£¬ÉÏ´ÎÇëÇóµÄʱºò£¬ÒòΪÄãµÄSQLÓï¾ä»òÕßÆäËûÔÒò£¬webserviceÖзµ»ØֵΪ¿Õ£¬²»ÊÇÄãÏëÒªµÄ½á¹û¼¯£¬ÔÚÄã·¢ÏÖwebserviceÖÐÓï¾äÌå³ö´íºó£¬½øÐÐÐ޸ģ¬ÖØвâÊÔ£¬ÈÔÈ»ÊÇÉϴεķµ»Ø½á¹û£¡¸Ð¾õ¾ÍÏñÄãµÄÐÞ¸ÄÍêÈ«ÎÞЧ¡£¡£
Æäʵ£¬ÕâÊÇÔÚAJAXµ ......
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using System.Timers;
using System.Data;
using System.Data.SqlClient;
namespace SMS_joke
{
/// <summary>
/// Global µÄժҪ˵Ã÷¡£
/// </summary>
public class ......
default.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls. ......