ASP.NET2.0ÍøÕ¾ÅäÖõÄÊý¾Ý¿âÁ¬½Óʧ°ÜÎÊÌâ
ÔÚʹÓÃÍøÕ¾¹ÜÀí¹¤¾ß×öµÇ¼ҳÃæµÄʱºòÓöµ½µÄÎÊÌâ
ËùÓöÎÊÌ⣺½øÈëVisual Studio 2005µÄ“ÍøÕ¾”²Ëµ¥µÄ“ASP.NET ÅäÖԺ󣬵ã»÷“°²È«”ºó£¬³öÏÖÈçϵijö´íÐÅÏ¢£º
“Ñ¡¶¨µÄÊý¾Ý´æ´¢Çø³öÏÖÎÊÌ⣬ÔÒò¿ÉÄÜÊÇ·þÎñÆ÷Ãû³Æ»òƾ¾ÝÎÞЧ£¬»òÕßȨÏÞ²»×ã¡£Ò²¿ÉÄÜÊÇδÆôÓýÇÉ«¹ÜÀíÆ÷¹¦ÄÜÔì³ÉµÄ¡£Çëµ¥»÷ÏÂÃæµÄ°´Å¥£¬ÒÔÖض¨Ïòµ½¿ÉÒÔÑ¡ÔñÐÂÊý¾Ý´æ´¢ÇøµÄÒ³¡£
ÏÂÃæµÄÏûÏ¢¿ÉÄÜ»áÓÐÖúÓÚÕï¶ÏÎÊÌâ: ÎÞ·¨Á¬½Óµ½ SQL Server Êý¾Ý¿â¡£ ”
ϵͳÅäÖãºWindows vista sp2 + IIS7 + Visual Studio 2005 + SQL Server 2005
½â¾ö°ì·¨£º
1¡¢´ò¿ªSDK ÃüÁîÌáʾ£¨ËùÓгÌÐò——Microsoft .NET Framework SDK v2.0——SDK ÃüÁîÌáʾ¡£Ò²¿É´ò¿ªVSµÄÃüÁîÌáʾ£©£¬ÊäÈëaspnet_regsql£¬µ¯³öASP.NET SQL Server °²×°Ïòµ¼£¬µãÏÂÒ»²½£¬µã“ΪӦÓóÌÐò·þÎñÅäÖà SQL Server”£¬µãÏÂÒ»²½£¬Êý¾Ý¿âÓÃ<ĬÈÏ>(aspnetdb)£¬µãÏÂÒ»²½£¬Íê³É¡£
2¡¢´ò¿ªVisual Studio 2005£¬ÒÀ´Î£º¹¤¾ß-->Ñ¡Ïî-->Êý¾Ý¿â¹¤¾ß-->Êý¾ÝÁ¬½Ó-->SQL ServerʵÀýÃû³Æ(ĬÈÏΪ¿Õ)£¬¸ÄΪÄãµÄ·þÎñÆ÷Ãû³Æ£¨Ä¬ÈÏʵÀýµÄÃû³Æ¼´ÎªÄãµÄ¼ÆËã»úÃû³Æ£©¡£
3¡¢»¹ÊÇVisual Studio 2005£¬¹¤¾ß-->Á¬½Óµ½Êý¾Ý¿â-->·þÎñÆ÷Ãû(ÊäÈë¸Õ²ÅµÄ·þÎñÆ÷)£¬¿ÉÒÔ°´ÄãÒªÇóÑ¡ÔñWindows»òSQL ServerÉí·ÝÑéÖ¤£¬È»ºóÊý¾Ý¿âÑ¡Ôñ¸Õ²ÅµÄaspnetdb¡£²âÊÔOKºó£¬µã“¸ß¼¶”£¬¸´ÖƶԻ°´°¿ÚµÄ×îÏÂÃæÒ»ÐÐÓï¾ä£¨±ÈÈ磬Èç¹ûÄã֮ǰѡÔñ“ʹÓà SQL ServerÉí·ÝÑéÖ¤”£¬Ôò¸´ÖƳöÀ´µÄÓï¾äÀàËÆΪData Source=Server;Initial Catalog=aspnetdb;User ID=sa£©
4¡¢´ò¿ªIIS:Ñ¡ÔñÍøÕ¾£¬µã»÷“ASP.NET” ÖеēÁ¬½Ó×Ö·û´®”£¬ÓÒ¼ü±à¼£¬Çå³ýÀïÃæµÄ×Ö·û´®£¬ÔÙÕ³ÌùµÚ3²½Ëù¸´ÖƵÄ×Ö·û´®£¬Èç¹ûÄãµÚ3²½ÊÇÑ¡ÔñSQL ServerÉí·ÝÑéÖ¤µÄ£¬»¹ÐèÔÚºó±ßÔÙÊÖ¶¯ÊäÈë“;Password=sa”£¬µ±È»£¬ºóÃæµÄsaÓÃÄãµÄÃÜÂëÌæ»»£¬È»ºóÈ·¶¨£¬Èç¹ûµÚ3²½ÊÇWindowsÉí ·ÝÑéÖ¤µÄ£¬ÔòÕ³ÌùºóÖ±½ÓÈ·¶¨±£´æ¼´¿É -->Ó¦Óᣣ¨Èç¹ûµÚ3²½ÊÇÑ¡ÔñSQL ServerÉí·ÝÑéÖ¤µÄ£¬ÔòÐ޸ĺóµÄÁ¬½Ó×Ö·û´®ÀàËÆΪData Source=Server;Initial Catalog=aspnetdb;User ID=sa;Password=sa£©
5¡¢
Ïà¹ØÎĵµ£º
Ò»¡¢Ä¿Ç°ÔÚASP.NETÖÐÒ³Ãæ´«Öµ¹²ÓÐÕâô¼¸ÖÖ·½Ê½£º
1¡¢±íµ¥Ìá½»£¬
<form action= "target.aspx" method = "post" name = "form1">
<input name = "param1" value = "1111"/>
<input name = "param2" value = "2222"/>
</form>
....
&nbs ......
ASP.NET 2.0 ÖÐÐÂÔö¼ÓÁË Theme µÄ¹¦ÄÜ£¬ËüµÄ³öÏÖÄÜÈÃÍøվʵÏÖ»»·ô¸ü¼ÓÈÝÒס£
Theme µÄʵÏÖ°üÀ¨£ºCSS¡¢Skin¡¢MasterPage¡£
CSS ÊÇÓÃÓÚ¿ØÖÆËùÓÐ HTML ±ê¼ÇµÄÍâ¹Û¡£
Skin ÊÇÓÃÓÚ¿ØÖÆËùÓÐ ASP.NET ·þÎñÆ÷µ÷ÕûµÄÍâ¹Û£¬²¢ÇÒ¿ÉÒÔͨ¹ýÊôÐÔ cssClass ¶¨ÒåËüµÄ CSS Ñùʽ¡£
MasterPage ÊÇ *.aspx Ò³ÃæÄ£°æ£¬²»¹ýËüûÓỶ¨Òåµ½ The ......
ÍêÕû´úÂëÈçÏ£º02_ClientCentric.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="02_ClientCentric.aspx.cs" Inherits="ClientCentric" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="h ......
Asp.netÖÐDataBinder.EvalÓ÷¨µÄ×ܽá
<%# Bind("Subject") %> //°ó¶¨×Ö¶Î
<%# Container.DataItemIndex + 1%> //ʵÏÖ×Ô¶¯±àºÅ
<%# DataBinder.Eval(Container.DataItem, "[n]") %>
ͨ³£Ê¹Óõķ½·¨(ÕâÈý¸öÐÔÄÜ×îºÃ)
<%# DataBinder.Eval(Container.DataItem, "ColumnName") %>
<%# DataBi ......
ASP.NET ProfileÊôÐÔ
×÷Óãº
´æ´¢ºÍʹÓÃΨһÓëÓû§¶ÔÓ¦µÄÐÅÏ¢
Õ¹ÏÖ¸öÈË»¯°æ±¾µÄWebÓ¦ÓóÌÐò
Óû§µÄΨһÉí·Ý±êʶÔÚÔٴηÃÎÊʱʶ±ðÓû§
ASP.NET ProfileÈçºÎ¹¤×÷
ÄãµÄWebÓ¦ÓóÌÐòÔËÐÐʱ£¬ASP.NET´´½¨Ò»¸ö´ÓProfileBaseÀද̬¼Ì³ÐÏÂÀ´µÄ¶¯Ì¬Éú³É³öÀ´µÄProfileCommonÀà¡£¶¯Ì¬ProfileCommonÀà°üº¬ÁËÄãÔÚWebÓ¦ÓóÌÐòÅäÖÃÎļ ......