RedirectToRoute() public method

public RedirectToRoute ( RouteValueDictionary routeValues ) : void
routeValues RouteValueDictionary
return void
 public void popupHandler(string campaignCustomerUuid, HttpResponse response)
 {
     response.RedirectToRoute(new
     {
         controller = "Home",
         action = "HandleMigrationPopup",
         campaignCustomerUuid
     });
 }
 public override void RedirectToRoute(object routeValues)
 {
     _httpResponse.RedirectToRoute(routeValues);
 }
Example #3
0
		public void RedirectToRoute ()
		{
			var resp = new HttpResponse (new StringWriter ());
			// Ho, ho, ho!
			AssertExtensions.Throws<NullReferenceException> (() => {
				resp.RedirectToRoute ("SomeRoute");
			}, "#A1");

			FakeHttpWorkerRequest2 request;
			HttpContext context = Cook (1, out request);

			// From RouteCollection.GetVirtualPath
			AssertExtensions.Throws<ArgumentException> (() => {
				context.Response.RedirectToRoute ("SomeRoute");
			}, "#A2");

			AssertExtensions.Throws<InvalidOperationException> (() => {
				context.Response.RedirectToRoute (new { productId = "1", category = "widgets" });
			}, "#A3");
		}
Example #4
0
 //[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
 public static void RedirectToRoutePermanent(this HttpResponse t, string routeName, RouteValueDictionary routeValues)
 {
     t.RedirectToRoute(routeName, routeValues, true);
 }
Example #5
0
 //[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
 public static void RedirectToRoutePermanent(this HttpResponse t, RouteValueDictionary routeValues)
 {
     t.RedirectToRoute(null, routeValues, true);
 }
Example #6
0
 //[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
 public static void RedirectToRoutePermanent(this HttpResponse t, string routeName)
 {
     t.RedirectToRoute(routeName, null, true);
 }
Example #7
0
 public static void RedirectToRoute(this HttpResponse t, string routeName, object routeValues)
 {
     t.RedirectToRoute(routeName, new RouteValueDictionary(routeValues), false);
 }
Example #8
0
 //[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
 public static void RedirectToRoute(this HttpResponse t, RouteValueDictionary routeValues)
 {
     t.RedirectToRoute(null, routeValues, false);
 }
Example #9
0
 //[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
 public static void RedirectToRoute(this HttpResponse t, string routeName)
 {
     t.RedirectToRoute(routeName, null, false);
 }
Example #10
0
 public static void RedirectToRoute(this HttpResponse t, object routeValues)
 {
     t.RedirectToRoute(new RouteValueDictionary(routeValues));
 }
 public void handleCustomerAlreadyExists(string email, HttpResponse response)
 {
     response.RedirectToRoute(new
     {
         controller = "Home",
         action = "CustomerAlreadyExists",
         email
     });
 }
 public void loginAndRedirectCustomer(string customerUserReference, HttpResponse response)
 {
     response.RedirectToRoute(new
     {
         controller = "Home",
         action = "Login",
         customerUserReference
     });
 }