asp.netÒ³ÃæתÏò
1.<a href=”test.aspx”></a>
2.ÕâÊÇ×î³£¼ûµÄÒ»ÖÖתÏò·½·¨;
HyperLink¿Ø¼þ
1.Asp.net ·þÎñÆ÷¶Ë¿Ø¼þ ÊôÐÔNavigateUrlÖ¸¶¨ÒªÌøתµ½µÄUrlµØÖ·
2.NavigateUrlÊÇ¿ÉÒÔÔÚ·þÎñÆ÷¶ËʹÓôúÂëÐ޸ģ¬Õâ¸öÇø±ðÓÚ<a>
3.ÓÉÓÚHyperLink±¾ÉíûÓÐʼþËùÒÔÒªÔÚ·þÎñÆ÷¶ËÆäËüʼþÖÐÉèÖÃNavigateUrl
4.´úÂëʾÀý
<Asp:HyperLink id=”hyperlink” runat=”server” NavigatoeUrl=”test.aspx”>ok</Asp:HyperLink>
Response.Redirect()·½·¨
1.¹ý³Ì£º·¢ËÍÒ»¸öHttpÏìÓ¦µ½¿Í»§¶Ë£¬Í¨Öª¿Í»§¶ËÌøתµ½Ò»¸öеÄÒ³Ã棬Ȼºó¿Í»§¶ËÔÙ·¢ËÍÌøתÇëÇóµ½·þÎñÆ÷¶Ë¡£
2.Ò³ÃæÌøת֮ºóÄÚ²¿¿Ø¼þ±£´æµÄËùÓÐÐÅÏ¢¶ªÊ§£¬µ±AÌøתµ½B£¬BÒ³Ã潫²»ÄÜ·ÃÎÊAÒ³ÃæÌá½»µÄÊý¾ÝÐÅÏ¢¡£
3.ʹÓÃÕâ¸ö·½·¨Ê¹ÓÃÕâ¸ö·½·¨Ìøתºóä¯ÀÀÆ÷µØÖ·À¸µÄUrlÐÅÏ¢¸Ä±ä
4.¿ÉÒÔʹÓÃSession Cookies ApplicationµÈ¶ÔÏó½øÐÐÒ³Ãæ¼äµÄÊý¾Ý´«µÝ
5.Öض¨Ïò²Ù×÷·¢ÉúÔÚ¿Í»§¶Ë£¬×ܹ²Éæ¼°µ½Á½´ÎÓëWeb·þÎñÆ÷µÄͨÐÅ£ºÒ»´ÎÊǶÔÔʼҳÃæµÄÇëÇó£¬ÁíÒ»´ÎÊÇÖض¨ÏòÐÂÒ³ÃæµÄÇëÇó
Server.Transfer()·½·¨
1.ʵÏÖÒ³ÃæÌøתµÄͬʱ½«Ò³ÃæµÄ¿ØÖÆȨ½øÐÐÒƽ»
2.Ò³ÃæÌøת¹ý³ÌÖÐRequest SessionµÈ±£´æµÄÐÅÏ¢²»±ä£¬Ìøת֮ºó¿ÉÒÔʹÓÃÉÏÒ»¸öÒ³ÃæÌá½»µÄÊý¾Ý
3.Ìøת֮ºóä¯ÀÀÆ÷µØÖ·À¸µÄUrl²»±ä
4.ÕâÖÖ·½·¨µÄÖض¨ÏòÇëÇóÊÇÔÚ·þÎñÆ÷¶ËµÄ½øÐеģ¬ä¯ÀÀÆ÷²»ÖªµÀÒ³ÃæÒѾ·¢ÉúÁËÒ»´ÎÌøת
Server.Execute()·½·¨
1.¸Ã·½·¨ÔÊÐíµ±Ç°Ò³ÃæÖ´ÐÐͬһ¸öWeb·þÎñÆ÷ÉϵÄÁíÒ»¸öÒ³Ãæ
2.Ò³ÃæÖ´ÐÐÍê±ÏÖ®ºóÖØлص½ÔʼҳÃæ·¢³öServer.Execute()µÄλÖá£
3.ÕâÖÖ·½Ê½ÀàËÆÕë¶ÔÒ³ÃæµÄÒ»´Îº¯Êýµ÷Óà ±»ÇëÇóµÄÒ³Ãæ¿ÉÒÔʹÓÃÔʼҳÃæµÄ±íµ¥Êý¾ÝºÍ²éѯ×Ö·û´®¼¯ºÏ
4.±»µ÷ÓÃÒ³ÃæµÄPageÖ¸ÁîµÄEnableViewStateMacÊôÐÔÉèÖÃΪFalse
»°ÌâÏà¹Ø:
1. ΪÁËÈ·±£HTMLÊä³öµÄºÏ·¨ÐÔ ×îºÃʹÓÃResponse.Redirect·½·¨;ÒòΪServer.Execute »òÕßServer.Transfer·½·¨·µ»Ø¸ø¿Í»§¶ËµÄÒ³Ãæ°üº¬¶à¸ö<Html><body>±ê¼Ç£¬²»ÊǺϷ¨µÄHTMLÒ³Ã棬ÔÚ·ÇIEä¯ÀÀÆ÷ÖпÉÄܻᷢÉú´íÎó¡£
2. ÓÉÓÚServer.TransferÔÚ·þÎñÆ÷¶ËÖ´ÐÐÖض¨Ïò£¬ËùÒÔ±ÜÃâÁ˲»±ØÒªµÄÍøÂçͨÐÅ£¬´Ó¶ø»ñµÃÁ˸üºÃµÄÐÔÄܺÍä¯ÀÀЧ¹û
Ïêϸ³ö´¦²Î¿¼£ºhttp://www.jb51.net/article/17334.htm
Ïà¹ØÎĵµ£º
Õâ¸öÊôÐÔÊÇÓÃÀ´ÑéÖ¤¿Í»§¶ËÓû§µÄÊäÈëµÄ,ÓÃÀ´ÑéÖ¤Óû§µÄÊäÈëÖÐÊÇ·ñÓÐΣÏÕ×Ö·ûµÄ,Õâ¸öÊôÐÔµÄĬÈÏֵΪtrue,΢ÈíÖ®ËùÒÔÕâô×öÊÇΪÁËÌá¸ßasp.net³ÌÐòµÄ°²È«ÐÔ,ËùÒԺܶà³ÌÐòÔ±¼´Ê¹²»ÖªµÀÔõôÀ´·ÀÓùºÚ¿ÍµÄ¹¥»÷,asp.netµÄһЩĬÈÏÊôÐÔµÈÄÚÈÝÒѾ¶Ô°²È«½øÐÐÁË¿ØÖÆ,ÕâÒ²ÊÇΪʲôasp.netµÄ³ÌÐòÏà¶ÔÀ´Ëµ±È½Ï°²È«µÄÔÒò!
¡¡¡¡¼ÈÈ»Õâ¸öÊô ......
asp.net·¢²¼ÍøվʱÈý¸öÑ¡ÏîµÄÎÊÌâ
·¢²¼ÍøÕ¾µÄʱºòÓÐÈý¸öÑ¡Ï
µÚÒ»¸öÑ¡ÏîÖ¸¶¨·¢²¼ºóÊDz»ÊÇ¿ÉÒÔÐÞ¸ÄaspxÎļþ£¬Èç¹û¹´Ñ¡£¬Ôò·¢²¼ºóµÄÍøÕ¾ÐÐΪ»ù±¾ÓëASP.NET 1.1Ò»Ö£¬Ö»ÒªÃ»ÓÐÔöɾÐ޸Ŀؼþ£¬¿ÉÒÔÖ±½ÓÔÚ·þÎñÆ÷ÉÏÐÞ¸ÄaspxÎļþ²»ÓÃÖØз¢²¼ÍøÕ¾¡£
µÚ¶þ¸öÑ¡ÏîÖ¸¶¨ÊDz»Êǽ«Ã¿¸öaspxÎļþ¶¼±à ......
Ò»¡¢ASP.NET Web Service´úÂë
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data.SqlClient;
namespace WebService1
{
/// <sum ......
ÔÚasp.netÀïʹÓÃcom×é¼þµ¼³öexcelºó×ÜÊÇ»áÓÐÒ»¸öEXCEL.EXE½ø³Ì´æÔÚ£¬Õ¼¾Ý×Å30¶àMµÄÄڴ棬Ñо¿Á˺þÃÊÔÁËÍøÉϵĺܶà°ì·¨¶¼Ã»Óнâ¾ö¡£½ñÌìÐÄÇé±È½Ï·ÅËÉ£¬½Ó×Å´ÓÍøÉÏËÑÁËһϣ¬¿´µ½Ò»ÆªÌû×ÓÈçÏ£º
ÔÚDOT NETÖе÷ÓÃExcelºó£¬Excel½ø³ÌµÄ²¢Î´ÖÕÖ¹ÎÊÌâµÄ½â¾ö°ì·¨ ÊÕ²Ø
ÔÚDOT NETÖе÷ÓÃExcelºó£¬Excel½ø³ÌµÄ²¢Î´ÖÕÖ¹ÎÊÌâ ......
ÎÒ們ÔÚ開發網頁應ÓóÌʽ£¬時³£ÐèҪȥ½âÎö網Ö·(Request.Url)µÄÿ個Ƭ¶Î£¬進ÐÐһЩÅÐ斷¡£ÀýÈç說 "http://localhost:1897/News/Press/Content.aspx/123?id=1#toc
"£¬ÎÒ們ÏëҪȡµÃ網Ö·裡µÚÒ»層Ä¿錄µ ......