title: How to redirect to route using custom attribute routing in MVC5
body: <p>I'm not sure if what I'm attempting to do is valid as I'm a relative newbie to the C# / ASP.NET / MVC stack.</p>
  
  <p>I have a controller action like this in <strong>ModelController.cs</strong></p>
  
  <pre><code>//Get
  [Route("{vehiclemake}/models", Name = "NiceUrlForVehicleMakeLookup")]
  public async Task&lt;ActionResult&gt; Index(string vehicleMake)
  {
      // Code removed for readaility
  
      models = await db.VehicleModels.Where(make =&gt; make.VehicleMake.Make == vehicleMake).ToListAsync();
  
      return View(models);
  }
  </code></pre>
  
  <p>and in another controller called <strong>VehicleMakeController.cs</strong>, I have the following:</p>
  
  <pre><code>[HttpPost]
  [Route("VehicleMake/AddNiceName/{makeId}")]
  public ActionResult AddNiceName(VehicleMake vehicleMake, int? makeId)
  {
      if (ModelState.IsValid)
      {
          var vehicle = db.VehicleMakes.Find(makeId);
          vehicle.MakeNiceName = vehicleMake.MakeNiceName;
          db.SaveChanges();
          return RedirectToRoute("NiceUrlForVehicleMakeLookup");
      }
      VehicleMake make = vehicleMake;
      return View(make);
  }
  </code></pre>
  
  <p>What I would like to do, is in where I'm returning when a db update is successful, redirect to the custom route I defined ( this part:  <em>return RedirectToRoute("NiceUrlForVehicleMakeLookup");</em> )</p>
  
  <p>The views I'm using are just standard views, can this be accomplished or do I need to start looking into Partials or Areas?</p>
  
  <p>Thanks in advance</p>