先定义一个类:
using
System;
namespace Rhombus.UIData.CO
{
/// <summary>
/// Summary description for PageNavigation.
/// </summary>
[Serializable]
public class PageNavigation
{
public string forePage;
public string backPage;
public PageNavigation()
{
//
// TODO: Add constructor logic here
//
}
}
}
namespace Rhombus.UIData.CO
{
/// <summary>
/// Summary description for PageNavigation.
/// </summary>
[Serializable]
public class PageNavigation
{
public string forePage;
public string backPage;
public PageNavigation()
{
//
// TODO: Add constructor logic here
//
}
}
}
在转到页面前:
Rhombus.UIData.CO.PageNavigation nav
=
new
Rhombus.UIData.CO.PageNavigation();
nav.backPage = " COItem.aspx " ;
nav.forePage = " COItem.aspx " ;
Session[ " COItemCostInfoNav " ] = nav;
Response.Redirect( " COItemCostInfo.aspx " );
nav.backPage = " COItem.aspx " ;
nav.forePage = " COItem.aspx " ;
Session[ " COItemCostInfoNav " ] = nav;
Response.Redirect( " COItemCostInfo.aspx " );
返回页面:
Rhombus.UIData.CO.PageNavigation nav
=
new
Rhombus.UIData.CO.PageNavigation();
nav = (Rhombus.UIData.CO.PageNavigation) Session[ " COItemCostInfoNav " ];
Response.Redirect( nav.forePage );
nav = (Rhombus.UIData.CO.PageNavigation) Session[ " COItemCostInfoNav " ];
Response.Redirect( nav.forePage );