title: How to access and confirm the transfer of my SelectedListItem TEXT from my dropdownlist from one view to another?
body: <p>I start the INDEX page by filling up the <code>IEnumerable</code> list for a <code>DropDownListFor()</code>. Then I send the model to the INDEX View.
  The photo in the bottom shows what the INDEX looks like with the two textboxs and the dropdownlist.</p>
  
  <p>Once the submit button is pressed I want the information to be printed in the ABOUT page to make sure the information is transferring. Specifically I want the TEXT of the <code>SelectedListItem</code>chosen from the <code>DropDownListFor()</code>. </p>
  
  <p>I tried transferring the TEXT of the selected value to the ABOUT View with the line <code>input.SelectedText = input.SelectedType.Text;</code>. This is inside the ABOUT default action but it never returns the string I set it too. Why is my <code>SelectedListItem</code> not transferring?</p>
  
  <p><strong>Model</strong></p>
  
  <pre><code>public class UserInputModel
      {
          public SelectListItem SelectedType { get; set; }
          public IEnumerable&lt;SelectListItem&gt; Type { get; set; }
          public string SelectedText { get; set; }
          [Required]
          public string Path { get; set; }
          [Required]
          public string Find{ get; set; }
  
  
          public IEnumerable&lt;SelectListItem&gt; FillType(IEnumerable&lt;SelectListItem&gt; list)
          {
              list = new[]
              {
                      new SelectListItem { Value = "1", Text = "Xml" },
                      new SelectListItem { Value = "2", Text = "Html" },
                      new SelectListItem { Value = "3", Text = "Css" },
                      new SelectListItem { Value = "4", Text = "C#" }
  
              };
              return list;
          }
  }
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public class FindController : Controller
      {
  
          public ActionResult Index()
          {
              var input = new UserInputModel();
              input.Type=input.FillType(input.Type);
              return View(input);
          }
  
          [HttpPost]
          public ActionResult Index(UserInputModel input)
          {
  
              return View("About", input);
          }
  
          public ActionResult About(UserInputModel input)
          {
  
  
              input.SelectedText = input.SelectedType.Text;
              return View(input); 
          }
      }
  </code></pre>
  
  <p><strong>View "Index"</strong></p>
  
  <pre><code>@using (Html.BeginForm("Index", "Find", FormMethod.Post))
  {
      @Html.AntiForgeryToken()
  
  
      &lt;div class="form-horizontal"&gt;
          &lt;hr /&gt;
  
          @Html.ValidationSummary(true, "Hello There", new { @class = "text-danger" })
          &lt;input type="hidden" id="hidText" name="hidText" /&gt;
          &lt;div class="form-group"&gt;
  
              @Html.LabelFor(model =&gt; model.SelectedType, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.DropDownListFor(model =&gt; model.SelectedType, Model.Type, "Select a File Type", new { @class = "form-control", name = "type" })
  
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Path, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.EditorFor(model =&gt; model.Path, new { htmlAttributes = new { @class = "form-control", name = "path" } })
                  @Html.ValidationMessageFor(model =&gt; model.Path, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
         @* &lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.SelectedFolder, htmlAttributes: new { @class = "control-label col-md-2" })
          &lt;div class="col-md-10"&gt;
              @Html.DropDownListFor(model =&gt; model.SelectedFolder, new SelectList(Model.DirectoryFolders), "Select a Folder:", new { @class = "form-control" })
  
          &lt;/div&gt;
      &lt;/div&gt;
      *@
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Find, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.EditorFor(model =&gt; model.Find, new { htmlAttributes = new { @class = "form-control", name = "find" } })
                  @Html.ValidationMessageFor(model =&gt; model.Find, "", new { @class = "text-danger" })
  
              &lt;/div&gt;
          &lt;/div&gt;
  
  
          &lt;div class="form-group"&gt;
              &lt;div class="col-md-offset-2 col-md-10"&gt;
  
                  &lt;input type="submit" value="Submit" class="btn btn-default" /&gt;
  
  
              &lt;/div&gt;
          &lt;/div&gt;
  
     &lt;/div&gt; 
  }
  </code></pre>
  
  <p><strong>View "About"</strong></p>
  
  <pre><code>&lt;body&gt;
      &lt;div&gt; 
          &lt;h3&gt;Selected:@Model.SelectedText&lt;/h3&gt;
          &lt;h3&gt;Path:@Model.Path&lt;/h3&gt;
          &lt;h3&gt;Find:@Model.Find&lt;/h3&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/rRuca.png" rel="nofollow noreferrer">INDEX View</a></p>
  
  <p><a href="https://i.stack.imgur.com/6w0cK.png" rel="nofollow noreferrer">ABOUT View</a></p>
  
  <p>Any other feedback on good and bad practices would be helpful since this is my first time working with MVC.</p>