asp.net·µ»Ø¼òµ¥Êý×é
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
'ÈôÒªÔÊÐíʹÓà ASP.NET AJAX ´Ó½Å±¾Öе÷ÓÃ´Ë Web ·þÎñ£¬ÇëÈ¡Ïû¶ÔÏÂÐеÄ×¢ÊÍ¡£
<System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class WebService
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function HelloWorld() As String()
Dim cities As String() = {"±±¾©", "ÉϺ£", "Ìì½ò", "ÖØÇì"}
Return cities
End Function
End Class
==============================================================
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 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">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div id="div1">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="~/WebService.asmx" />
</Services>
</asp:ScriptManager>
</div>
</form>
<script&
Ïà¹ØÎĵµ£º
ÈÏʶASP.NETÅäÖÃÎļþWeb.config
×÷ÕߣºSabine¡¡À´Ô´£ºÈüµÏÂÛ̳
¡¡¡¡Ò»¡¢ÈÏʶWeb.configÎļþ
Web.configÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ýVB.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿ ......
дcookie
¡¡¡¡1 HttpCookie cookie = new HttpCookie("Info");//¶¨Òåcookie¶ÔÏóÒÔ¼°ÃûΪInfoµÄÏî
¡¡¡¡2 DateTime dt = DateTime.Now;//¶¨Òåʱ¼ä¶ÔÏó
¡¡¡¡3 TimeSpan ts=new TimeSpan(1,0,0,0);//cookieÓÐЧ×÷ÓÃʱ¼ä£¬¾ßÌå²émsdn
¡¡¡¡4 cookie.Expires = dt.Add(ts);//Ìí¼Ó×÷ÓÃʱ¼ä
¡¡¡¡5 cookie.Values.Add("user","cx ......
ASP.NET ÌṩÈýÖÖÓÃÓÚÔÚ³öÏÖ´íÎóʱ²¶»ñºÍÏìÓ¦´íÎóµÄÖ÷Òª·½·¨£ºPage_Error ʼþ¡¢Application_Error ʼþÒÔ¼°Ó¦ÓóÌÐòÅäÖÃÎļþ (Web.config)¡£
Èç¹ûÄú²»µ÷Óà Server.ClearError »òÕß²¶»ñ Page_Error »ò Application_Error ʼþÖеĴíÎó£¬Ôò½«¸ù¾Ý Web.config ÎļþµÄ <customErrors> ²¿·ÖÖеÄÉèÖô¦Àí´íÎó¡£ÔÚ <cus ......
Windows Éí·ÝÑéÖ¤Ìṩ³ÌÐò ÌṩÓйØÈçºÎ½« Windows Éí·ÝÑéÖ¤Óë Microsoft Internet ÐÅÏ¢·þÎñ (IIS) Éí·ÝÑéÖ¤½áºÏʹÓÃÀ´È·±£ ASP.NET Ó¦ÓóÌÐò°²È«µÄÐÅÏ¢¡£ Forms Éí·ÝÑéÖ¤Ìṩ³ÌÐò ÌṩÓйØÈçºÎʹÓÃÄú×Ô¼ºµÄ´úÂë´´½¨Ó¦ÓóÌÐòÌض¨µÄµÇ¼´°Ìå²¢Ö´ÐÐÉí·ÝÑéÖ¤µÄÐÅÏ¢¡£Ê¹Óà Forms Éí·ÝÑéÖ¤µÄÒ»ÖÖ¼ò±ã·½·¨ÊÇʹÓà ASP.NET ³ÉÔ±×ʸñ ......