Asp.net Ò³Ãæ´«ÖµÖ® @ PreviousPageType Ö¸Áî¡£
¸ø³öÈçÏÂÀý×Ó ÎÒÖ»ÖªµÀÕâÑù×ö¿ÉÒÔµ÷ÓÃÉÏÒ»¸öÒ³Ãæ µÄÖµ»òÕß·½·¨ µ«ÊÇÎÒ²»ÖªµÀÔÀíºÍËüµÄÓÅÂÔ
Çë¸ßÊÖ ¼ÓÒÔÖ¸µã ´ó¼Ò¹²Í¬Ñ§Ï° лл£¡
1.Default.aspx Ò³Ãæ
protected void but1_Click(object sender, EventArgs e)
{
Server.Transfer("Default2.aspx");
}
public String getName
{
get
{
return "aaaaaaaaaa";
}
}
2.ÔÚ Default2.aspx Ò³ÃæµÄ<%@ Page Ö¸ÁîºóÃæÌí¼Ó <%@ PreviousPageType VirtualPath="~/Default.aspx" %>
Ö¸Áî @ PreviousPageType ÖÐÓÐÁ½ÊôÐÔ Ö»ÄÜдһ¸ö Á©¶¼Ð´µÄ»°µÈÓÚ°×д....ÏêÇé²Î¿¼MSDN
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//Ï൱Óëµ÷Óà Default Ò³ÃæµÄ·½·¨»òÕßÊôÐÔ!
Response.Write("PreviousPage.getName");
//ÔÚDefault2Ò³ÃæÊä³öDefautÒ³ÃæÖÐÉèÖÃµÄ Ò»¸öÊôÐÔ Name;
}
}
Çë¸ßÊÖ¼ÓÒÔ ËµÃ÷°× ºÇºÇ ÎÒÊdzõѧÕß.
Ïà¹ØÎĵµ£º
Èç¹ûÄã²»×ÜÊÇÓà Windows
É쵀 Internet
Explorer
À´ÉÏÍøµÄ»°£¬Äã¿ÉÄÜ»á×¢Òâµ½£¬Ðí¶àÍøÕ¾ÉϵÄÊÓƵµã²¥Ö®ÀàµÄ¶àýÌåÄÚÈÝ£¬ÄãÎÞ·¨Ö±½ÓÔÚ Internet Explorer
ÒÔÍâµÄÆäËüä¯ÀÀÆ÷Öйۿ´£¬±ÈÈçÃ÷Ã÷ÒѾ°²×°
Á˲å¼þÈ´ÌáʾȱÉÙ²å¼þ£¬»òÕßʲô¶¼²»Ìáʾ³öÏֿյĿò¿ò£¬»òÕßÏÔ
ʾÁ˲¥·ÅÆ÷²å¼þȴʼÖÕÁ¬²»ÉÏ´ò²»¿ªÖ®ÀàµÄÎÊÌ⣠......
¸ÃÎÄÕÂתÓ룺http://dotnet.chinaitlab.com/ASPNET/806622.html
Êý¾Ý¿â·ÃÎÊÐÔÄÜÓÅ»¯
¡¡¡¡Êý¾Ý¿âµÄÁ¬½ÓºÍ¹Ø±Õ
¡¡¡¡·ÃÎÊÊý¾Ý¿â×ÊÔ´ÐèÒª´´½¨Á¬½Ó¡¢´ò¿ªÁ¬½ÓºÍ¹Ø±ÕÁ¬½Ó¼¸¸ö²Ù×÷¡£ÕâЩ¹ý³ÌÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»»ÐÅÏ¢ÒÔͨ¹ýÉí·ÝÑéÖ¤£¬±È½ÏºÄ·Ñ·þÎñÆ÷×ÊÔ´¡£ ASP.NETÖÐÌṩÁËÁ¬½Ó³Ø(Connection Pool)¸ÄÉÆ´ò¿ªºÍ¹Ø±ÕÊý¾Ý¿â¶ÔÐÔÄÜµÄ ......
1.´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="++"')</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attributes.Add("onclick","return ......
ÐèÇó£º
AÓòÓÐÒ³Ãæa.html£¬ÆäÖÐÓÐiframe°üº¬BÓòµÄÒ³Ãæb.html£¬ÏÖÔÚҪͨ¹ýa.htmlÉϵÄÒ»¸ö°´Å¥£¬À´°Ña.htmlÒ³ÃæÉÏÒ»¸öÎı¾¿òµÄÖµ´«µÝµ½b.htmlÒ³ÃæµÄÎı¾¿ò¡£
×¢£ºÕâÀïb.htmlÊÇhtmlÍøÒ³£¬²»ÄܽÓÊÕÆäËûÍøÕ¾post¹ýÀ´µÄÖµ£¬ËùÒÔ²»ÄÜÓÃÖ±½ÓpostµÄ·½·¨À´´«Öµ£¬µ«ÊÇ£¬Èç¹û½ÓÊÕÒ³ÃæÊÇb.aspx»òÕßb.asp ÄØ£¬ÄDz»ÊÇ¿ÉÒÔÖ±½ÓpostÁËô£¿´ð ......
web.config:
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="chunyou128<you@163.com>">
&n ......