title: How to work with specific parameter of a Controller
body: <h2>The goal</h2>
  
  <p>Treat an offer as a category in controller.</p>
  
  <h2>The problem</h2>
  
  <p>I have a controller whose name is <code>ProductsController</code>. Inside it, I have an action called <code>Category</code>. When this method is requested, it responds with a view of products list that corresponds to the category passed as parameter. Follow the code:</p>
  
  <pre><code>[HttpGet]
  public ActionResult Category(string categoryName = null)
  {
      if (Regex.Match(categoryName, @"\d+").Success)
      {
          int categoryId = Convert.ToInt32(Regex.Match(categoryName, @"\d+").Value);
          string sluggedCategoryName = CommodityHelpers.UppercaseFirst(CommodityHelpers.GenerateSlug(Categories.GetDetails((sbyte)categoryId).Category_Name));
  
          if (String.Format("{0}-{1}", categoryId, sluggedCategoryName) == categoryName)
          {
              ViewBag.Title = Categories.GetDetails((sbyte)categoryId).Category_Name;
              ViewBag.CategoryProductsQuantity = Categories.GetDetails((sbyte)categoryId).Category_Products_Quantity;
              ViewBag.CurrentCategory = sluggedCategoryName;
              return View(Products.BuildListForHome(categoryId, null));
          }
          else
          {
              return View("404");
          }
      }
      else
      {
          return View("404");
      }
  }
  </code></pre>
  
  <p>But I want to return other a specific view when "Offers" is passed as parameter.</p>
  
  <p>How can I do this?</p>