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õѧÕß.
Ïà¹ØÎĵµ£º
¡¡¡¡ÓÉÊý¾Ý¿âÇý¶¯µÄWebÓ¦ÓóÌÐò£¬Èç¹ûÐèÒª¸ÄÉÆÆäÐÔÄÜ£¬×îºÃµÄ·½·¨ÊÇʹÓûº´æ¹¦ÄÜ¡£Óû§´ÓÊý¾Ý¿âÖмìË÷Êý¾Ý£¬¿ÉÄÜÊÇWebÓ¦ÓóÌÐòÖÐÖ´ÐÐ×îÂýµÄ²Ù×÷Ö®Ò»¡£ÒòΪÆäÖÐÉæ¼°¶à¸ö»·½Ú£¬ÀýÈ磬Web·þÎñÆ÷¡¢Êý¾Ý¿â·þÎñÆ÷µÈ¡£ÓÈÆäÊÇÔÚÓû§±È½Ï¶à£¬¼ìË÷µÄÊý¾ÝÁ¿±È½Ï´óµÄÇé¿öÏ£¬»á¸ø°üÀ¨Óû§ÔÚÄڵĸ÷¸ö·½ÃæÔì³É²»Ð¡µÄÀ§ÄÑ¡£Èç¹ûÄܹ»½«Êý¾Ý¿ ......
ÐèÇó£º
AÓòÓÐÒ³Ãæa.html£¬ÆäÖÐÓÐiframe°üº¬BÓòµÄÒ³Ãæb.html£¬ÏÖÔÚҪͨ¹ýa.htmlÉϵÄÒ»¸ö°´Å¥£¬À´°Ña.htmlÒ³ÃæÉÏÒ»¸öÎı¾¿òµÄÖµ´«µÝµ½b.htmlÒ³ÃæµÄÎı¾¿ò¡£
×¢£ºÕâÀïb.htmlÊÇhtmlÍøÒ³£¬²»ÄܽÓÊÕÆäËûÍøÕ¾post¹ýÀ´µÄÖµ£¬ËùÒÔ²»ÄÜÓÃÖ±½ÓpostµÄ·½·¨À´´«Öµ£¬µ«ÊÇ£¬Èç¹û½ÓÊÕÒ³ÃæÊÇb.aspx»òÕßb.asp ÄØ£¬ÄDz»ÊÇ¿ÉÒÔÖ±½ÓpostÁËô£¿´ð ......
ÕâÀïÊÇ´ÓDatasetÀïµÄÊý¾ÝÉú³ÉÇúÏßͼ.
ÎÒµÄDatasetÊÇ´Ó±íSendrecÀï¶ÁÈ¡µÄÊý¾Ý,·Ö±ðÓÐId,Sendid(¶©µ¥ºÅ),Sendtime(¼Ç¼ʱ¼ä),Sendnum(µ¥Î»Ê±¼ä·¢ËÍÁ¿/ÎÒÕâÀïÊÇÎå·ÖÖÓ)¼¸¸ö×Ö¶Î
¹ý³ÌÈçÏÂ:
public void draw(Page page,DataSet ds,int Tnum){}
ÆäÖÐpageÊÇÓÃÀ´´«µÝÒýÓÃÕâ¸ö¹ý³ÌµÄÒ³Ãæ,ÕâÑùÈÃÒ³ÃæÊÇJPG·½Ê½Ö±½ÓÏò¿Í»§¶ËÊä³öÉú ......
public bool SaveExcel(GridView paramGridView)
{
if (paramGridView.Rows.Count == 0)
{
return false;
}
//´´½¨Excel¶ÔÏó
Microsoft.Office.Interop.Excel.Application myExcel = new Microsoft.Office.Interop.Excel.Appl ......
ÉÏ´Î×öÁ˸öÏîÄ¿£¬Éæ¼°µ½Êý¾Ý¿âµÄ»¹ÔºÍ»Ö¸´£¬µ½ÍøÉÏÕÒÁËһϣ¬ÊÇÀûÓÃSQLDMOʵÏֵģ¬Ö»ÒªÌí¼ÓSQLDMOÒýÓþͺÃÁË£¬È»ºóÀûÓÃϱߵÄÀàµÄ·½·¨¾Í¿ÉÒÔʵÏÖÁË¡£
ÎÒ°ÑÔ×÷ÕßµÄÀàÀ©³äÁËһϣ¬¿ÉÒÔ×Ô¶¯Ê¶±ðweb.configÀï µÄÊý¾Ý¿âÁ¬½Ó×Ö·û´®£¬¿ÉÒÔͨ¹ý±äÁ¿ÉèÖû¹Ô»Ö¸´µÄÐÅÏ¢¡£
ÐèҪעÒâµÄʱ»¹Ô£¬»¹ÔµÄʱºòÎÊÌ ......