I am working on a project that has page flow controlled by a Controller of the MVC framework. For some complcated pages I must use the Classic WebForm type, rather than a regular View page. 
When the page in Classic ASP.net WebForm has finished its job, the page needs to redirect back to the MVC controller and go to next page decided by the Business logic in the Controller

Here, I listed some redirect code that may be useful.

In classic Web Form page
  protected void btnContinue_Click(object sender, EventArgs e)
        {
            BillingProcess process = CurrentProcess;//BillingmanagementService.GetProcess(Uid);
            process.CurrentStep = BillingManagementStep.TempCreditStart;//this is required, to make sure the current step
            Response.Redirect(ViewMapUti.GetProcessUrl("continue", process.CurrentStep, Uid));
           // Response.Redirect(string.Format("/BillingManage/Process/continue/{0}/{1}",process.CurrentStep, Uid));
        }

In Controller
    protected ActionResult GoToPage(BillingProcess process)
        {
            if (process != null)
            {
                RedirectResult rUrl = CheckIfClassicPage(process);
                if (rUrl != null)
                    return rUrl;
                return View(ViewMapUti.GetMapPage(process.CurrentPage), process);
            }
            else
                return View("Index");
        }
   protected RedirectResult CheckIfClassicPage(BillingProcess process)
        {
            string url = ViewMapUti.GetClassicUrl(process.CurrentStep, process.UidCustomerId);
            if (url != null)
                return Redirect(url);
            else
                return null;

        }


   In Help class ViewMapUti.cs
    public class ViewMapUti
{

// this need put in MapHelper.cs in the root public static String GetMapPage(string key)
{
///TODO:we should have a map in xml do defined which current viwe will be used. ///for example, we have made the change of Page1, rename to page2, but want keep the page2, ///just need add the page1 page2 in the mapfile if(key.Equals("initial",StringComparison.CurrentCultureIgnoreCase))
{
key="StartProcess";
}
return key;
}
public static string GetProcessUrl(string actionButton, BillingManagementStep step, long uid)
{
return GetProcessUrl("Process", actionButton, step, uid);
}
public static string GetProcessUrl(string view, string actionButton, BillingManagementStep step, long uid)
{
if (view == null )
return GetHomeUrl();
/// 1.{controller}/{step}/{uid}/{action}.aspx/{actionButton} // return string.Format("/{0}/{1}/{2}/{3}.aspx/{4}", "BillingManage", step,uid, view, actionButton); ///2. /BillingManage/Process.aspx?uid=121&actionButton=process&step=ProcessingRequest /// return GetVirtualPath() + string.Format("/{0}/{1}.aspx?uid={2}&actionButton={3}&step={4}", "BillingManage", view, uid, actionButton, step);
}
public static string GetHomeUrl()
{
return HttpRuntime.AppDomainAppVirtualPath+"BillingManage/Index.aspx";
}
public static string GetClassicUrl(BillingManagementStep step, long uid)
{
if (step == BillingManagementStep.StartProcess ||step==BillingManagementStep.Initial)
{
//if need classic //Don't use transfer, it will cause javascript error in Ajax sometime(not every time). //Server.Transfer("/Classic/startProcess.aspx?uid=" + uid); return (GetVirtualPath() + "/Classic/startProcess.aspx?uid=" + uid);

}
else if (step == BillingManagementStep.EcouponCredit)
{
return (GetVirtualPath() + "/Classic/EcouponCredit.aspx?uid=" + uid);
}
else if (step == BillingManagementStep.TempCreditStart)
{
return (GetVirtualPath() + "/Classic/TempCredit.aspx?uid=" + uid);
}
return null;
}
public static string GetVirtualPath()
{
return HttpRuntime.AppDomainAppVirtualPath.Equals("/") ? "" : HttpRuntime.AppDomainAppVirtualPath + "/";
}
}


  


 
Saturday, 15 January 2011 06:27:46 (Eastern Standard Time, UTC-05:00)
fari
Sunday, 03 April 2011 04:32:47 (Eastern Daylight Time, UTC-04:00)
cheap coach handbags outlet
Friday, 15 April 2011 03:08:01 (Eastern Daylight Time, UTC-04:00)
There is no royal road to science ,and only those who do not dread the fatiguing climb of gaining its numinous summits .
Friday, 15 April 2011 03:08:47 (Eastern Daylight Time, UTC-04:00)
I have nothing to offer but buy cheap wow gold , toil tears and sweat .
Wednesday, 04 May 2011 05:35:58 (Eastern Daylight Time, UTC-04:00)
Although cheap jordans free shipping the NBA cheap jordans for sale Playoffs are air jordan vi in full swing air jordan 13 retro and Lebron James air jordan 11 retro himself will cheap air jordan 9 retro most likely cheap nike air max be keeping Cheap Jordans to the Playoff version Cheap Air Jordans of his Nike Air Max Lebron 8, that Air Jordans for sale does not mean Authentic Air Jordans other alternatives Authentic Jordans can’t be gathering authentic air jordans for sale hype as authentic jordans sale well. One such cheap authentic jordans Nike Basketball cheap authentic jordans sale design that Jordan XI proves this jordan flight 9 true is jordan flight 45 the “Sprite” colorway jordan six rings of the Nike Air Max Lebron air jordan iii 8 V2 in a low-top cut. After air jordan dub zero seeing what happened Air Jordan Retro 1 to Kobe Bryan’t foot in round air jordan 13 1 of the NBA Playoffs, may air jordan silver anniversary you’ll be less air jordan vi quick to ball in low-top shoes, but the ones pictured nike jordan shoes online sale here would look good off authentic retro jordan on the court just as it would on. So enjoy the following batch of more images of this interesting colorway to see if you’ll think of pursuing.

Wednesday, 04 May 2011 05:37:18 (Eastern Daylight Time, UTC-04:00)
It’Cheap Jordan Shoes s been quite Cheap Jordan Sneakers some time since Jordan Sneakers Sale we’ve taken Cheap Jordan Shoes sale a look at Jordan Sneakers the skater boy-friendly Air Jordan cheap Jordan Sneaker Sale I Phat low. We Jordan Sneaker Sale saw it back Nike Air Jordan 2010 in February when two Jordan Dub Zero colorways were air jordan dub zero introduced, but Air Jordan Silver Anniversary now outdoor jordan 1 flight skating season is actually Jordan Flight 9 upon us and Nike Air Jordan 16.5 they might Air Jordan 10 retro serve more retro air jordan 11 of a purpose. Pictured air jordan 12 retro here is a Air Jordan Retro 1 white/black-deep Nike Air Jordan Retro 1 royal Air Jordan Air Jordan 1 I Phat low that should Air Jordan Retro 11 appeal to jordan xi all you lamenting Air Jordan 14 Magic fans jordan retro 6 (and perhaps also jordan flight 45 soon to air jordan retro 6 be Mavericks fans?). Let us know how you feel about the colorway; but, also, about the design itself since it’s been in sort of hiding.
Monday, 01 August 2011 04:55:11 (Eastern Daylight Time, UTC-04:00)
It’s really a very good oakley sunglasses cheap article,I learn so much fake oakleys thing from it,Thanks You.
Monday, 01 August 2011 04:56:11 (Eastern Daylight Time, UTC-04:00)
Good article! Thank you so much for sharing this ray ban aviators post, Your views truly open my mind. ray ban rb3025.
Friday, 05 August 2011 01:41:35 (Eastern Daylight Time, UTC-04:00)
Right here,Air Jordan Fusion 9 you are going to see a countdown on the top five basketball shoes of all time. I know there might be some unfair judging here Jordans shoes Online because I am the only judge, but it will have to work.Authentic Air MaxI also know and you must as well that this is just my opinion. Air Jordan Fusion 8If you have one that differs that is alright with me. Jordan Air Max FusionSo here we go on the top five basketball shoes of all timeAir Jordan Fusion 5.5. Air Jordan 1:</strong> These are made by Nike and were Jordan's first shoe which is what makes it such an Air Jordan Fusion 4
iconic shoe. These shoes made basketball shoes popular. Nobody before this shoe thought that you could sell shoes for over 100$, but these shoes sold for 150$ Air Jordan Spizike. What helped make them so popular was that Jordan Air Jordans Onlinewore these shoes even though it was banned by the NBA and took the fine. Louis Vuitton handbags can trace back to France. Cheap Louis VuittonIn the begining of the nineteenth century,Authentic Louis Vuitton Napoleon III, the French emperor, was looking for someone to manage the bags of Empress Eugene. Louis Vuitton, LV bags salea professional luggage handler who pack luggage for upper class families, was the right man the emperor found.Louis Vuitton AccessoriesVuitton invented airtight and flat stackable luggage. Louis Vuitton clothesFrom these practices, Vuitton bagan his own business,Louis Vuitton Antheia handbags
What can I do if I can't afford a Louis Vuitton?Replica Louis Vuitton is a good choice if original Louis Vuitton is a burden for you.Louis Vuitton damier handabgs Attention: replica handbags don't mean inferior handbags. The only difference between replica handbags and original designer handbags is the price.Discounted Louis Vuitton Handbags Replica handbags make designer handbags ccessible to every woman. Authentic Cheap Louis Vuitton
Saturday, 20 August 2011 02:15:21 (Eastern Daylight Time, UTC-04:00)
rond louis watches watches replica gadgets inventors Burberry is watches replica 2.5 inches long You can also carry replica watch soft faux lather Pewter Black or.
Comments are closed.