Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.netµÄÄÚÖöÔÏó

ASP.NETµÄÄÚÖöÔÏó½éÉÜ
1.Response
2.Request
3.Server
4.Application
5.Session
6.Cookie
Request¶ÔÏóÖ÷ÒªÊÇÈ÷þÎñÆ÷È¡µÃ¿Í»§¶Ëä¯ÀÀÆ÷µÄһЩÊý¾Ý,°üÀ¨´ÓHTML±íµ¥ÓÃPost»òÕßGET·½·¨´«µÝµÄ²ÎÊý¡¢CookieºÍÓû§ÈÏÖ¤¡£ÒòΪRequest¶ÔÏóÊÇPage¶ÔÏóµÄ³ÉÔ±Ö®Ò»£¬ËùÒÔÔÚ³ÌÐòÖв»ÐèÒª×öÈκεÄÉùÃ÷¼´¿ÉÖ±½ÓʹÓã»ÆäÀàÃûΪ HttpRequestÊôÐԺܶ࣬µ«·½·¨ºÜÉÙ£¬Ö»ÓÐÒ»¸öBinaryRead()
1.ʹÓÃRequest.FormÊôÐÔ»ñÈ¡Êý¾Ý
ͨ¹ý¸ÃÊôÐÔ£¬¶ÁÈ¡Ö®¼äµÄ±íµ¥Êý¾Ý.×¢Ò⣺Ìá½»·½Ê½ÒªÉèÖÃΪ¡°Post¡±¡£ÓëGet·½·¨Ïà±È½Ï£¬Ê¹ÓÃPost·½·¨¿ÉÒÔ½«´óÁ¿Êý¾Ý·¢Ë͵½·þÎñÆ÷¶Ë
2.ÀûÓÃRequest.QueryStringÊôÐÔ»ñÈ¡Êý¾Ý
Request¶ÔÏóµÄQueryStingÊôÐÔ¿ÉÒÔ»ñÈ¡ HTTP ²éѯ×Ö·û´®±äÁ¿¼¯ºÏ ¡£ ͨ¹ý¸ÃÊôÐÔ£¬ÎÒÃÇ¿ÉÒÔ¶ÁÈ¡µØÖ·ÐÅÏ¢  http://localhost/aaa.aspx?uid=tom&pwd=abcÆäÖбêʶΪºìÉ«²¿·ÖµÄÊý¾Ý.×¢Ò⣺Ìá½»·½Ê½ÒªÉèÖÃΪ¡°Get¡±
3.ÎÊÌ⣺Request.FormÓÃÓÚ±íµ¥Ìá½»·½Ê½ÎªPostµÄÇé¿ö£¬¶øRequest.QueryStringÓÃÓÚ±íµ¥Ìá½»·½Ê½ÎªGetµÄÇé¿ö£¬Èç¹ûÓÃ´í£¬Ôò»ñÈ¡²»µ½Êý¾Ý¡£½â¾ö·½·¨£ºÀûÓÃRequest(¡°ÔªËØÃû¡±)À´¼ò»¯²Ù×÷¡£
4.Request.ServerVariables("»·¾³±äÁ¿Ãû³Æ")
ÀàËƵĻ¹ÓУºUserHostAddress,Browser,Cookies,ContentType,IsAuthenticatedItem,ParamsResponse¶ÔÏóÓÃÓïÊä³öÊý¾Ýµ½¿Í»§¶Ë£¬°üÀ¨Ïòä¯ÀÀÆ÷Êä³öÊý¾Ý¡¢Öض¨Ïòä¯ÀÀÆ÷µ½ÁíÒ»¸öURL»òÏòä¯ÀÀÆ÷Êä³öCookieÎļþ¡£ÆäÀàÃûΪhttpResponseÊôÐԺͷ½·¨¡£
Write() Ïò¿Í»§¶Ë·¢ËÍ×Ö·û´®ÐÅÏ¢
BufferOutPutÊôÐÔ      ÊÇ·ñʹÓûº´æ
Clear() Çå³ý»º´æ
Flush()    Ç¿ÖÆÊä³ö»º´æµÄËùÓÐÊý¾Ý
Redirect() ÍøҳתÏòµØÖ·
End() ÖÕÖ¹µ±Ç°Ò³µÄÔËÐР
WriteFile() ¶ÁÈ¡Ò»¸öÎļþ£¬²¢ÇÒдÈë¿Í»§¶ËÊä³öÁ÷ (ʵÖÊ£º´ò¿ªÎļþ£¬²¢ÇÒÊä³öµ½¿Í»§¶Ë¡£)
1.Response.Write ±äÁ¿Êý¾Ý»ò×Ö·û´®
Response.Write (±äÁ¿Êý¾Ý»ò×Ö·û´®)
Response.Write("") 
Response.Write(" ") 
2.Response¶ÔÏóµÄRedirect·½·¨½«¿Í»§¶Ëä¯ÀÀÆ÷Öض¨Ïòµ½ÁíÍâµÄURLÉÏ£¬¼´Ìøתµ½ÁíÒ»¸öÍøÒ³¡£ÀýÈç:Response.Redirect("http://www.example.com/")
3. Response.End() ÖÕÖ¹µ±Ç°Ò³µÄÔËÐÐ
4.Response.WriteFile(FileName)ÆäÖУºFileName Ö¸´úÐèÏòä¯ÀÀÆ÷Êä³öµÄÎļþµÄÎļþÃû
Server¶ÔÏóÌṩ¶Ô·þÎñÆ÷Éϵķ½·¨ºÍÊôÐÔ½øÐеķÃÎÊ .ÆäÀàÃû³ÆÊÇHttpServerUtility.
Server¶ÔÏóµÄÖ÷ÒªÊôÐÔÓУº
MachineName£º»ñÈ¡·þÎñÆ÷µÄ¼ÆËã»úÃ


Ïà¹ØÎĵµ£º

asp.net ²Ù×÷xml

asp.net ¶ÔxmlÎļþµÄ¶Áд,Ìí¼Ó,ÐÞ¸Ä,ɾ³ý²Ù×÷
ÏÂÃæÓдúÂëµ÷ÊÔÕýÈ·
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using&nb ......

¹ØÓÚ ASP.NET Èý²ã¼Ü¹¹

Ò»°ã¶ÔÓÚÓùý ¶¯Èí.net´úÂëÉú³ÉÆ÷µÄÈËÀ´Ëµ£¬Ê¡Á˺öàÊÂÇé¡£  model £¨ÊµÌå²ã£©,  dal£¨Êý¾Ý·ÃÎʲ㣩,  bll£¨ÒµÎñÂß¼­²ã£©
model ¾Í²»ÓÃ˵ÁË dalÊý¾Ý·ÃÎʲãÓеÄʱºòÒªµ÷Óô洢¹ý³Ì£¬ÒÔÇ°ºÜÉÙд£¬¾õµÃ²ÎÊýµÄµ÷ÓÃͦ·Ñ¾¢µÄ£¬´ó¼ÒÓÐʲôºÃµÄ°ì·¨ÄÜÌá¸ß´æ´¢¹ý³ÌÂ𣡣¡£¡£¡£¡£¡£¡£¡£¡£¡ ......

asp/asp.netÁ¬½Ósql anywhereÊý¾Ý¿â


<%
set conn= server.createobject("ADODB.connection")
conn.open "driver={sybase driver 10};"
"srvr=SYBASE;"
"UID=sa;"
"pwd=sybase;"
sql="select no from tab_st ......

ZZʹÓÃSQL Server´æ´¢ASP.NET Session±äÁ¿

´´½¨ºÍÅäÖÃASP.NET Session״̬Êý¾Ý¿â
ÔÚ»ùÓÚNLB£¨ÍøÂ縺ÔØƽºâ£©»·¾³ÏµÄASP.NET WebÓ¦ÓóÌÐò¿ª·¢£¬ÎÒÃÇÐèÒª½«Session´æ´¢ÔÚÊý¾Ý¿âÖ驶à¸öWebÓ¦ÓóÌÐòµ÷Óã¬ÒÔÏÂΪÅäÖ÷½·¨¼°×¢ÒâÊÂÏî¡£
1.´´½¨ÓÃÓÚ´æ´¢ASP.NET SessionµÄÊý¾Ý¿â£¨Ô¶³Ì¡¢±¾µØ½Ô¿É£¬Ê¹ÓÃÊý¾Ý¿âÓû§Éí·ÝÈÏÖ¤£©
ÔÚWindows\Microsoft.NET\Framework/V2.0.507 ......

asp.net»ñÈ¡´«ÖµgetºÍpostÇëÇó

//postÇëÇó
string name = Request["name"].toString();
string name =Request.Form.Get("name").toString();
//getÇëÇó
string name = Request.QueryString["name"].toString();
µ«ÎÒ·¢ÏÖ ÎÞÂÛÊÇ·ñÊÇpostÓëget´«Öµ¶¼¿ÉÓÃ
string name = Request["name"].toString();

±íµ¥Ìá½»ÖÐgetºÍpost·½Ê½µÄÇø±ð¹éÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ