title: ASP.Net MVC3 Viewbag - set to selected index of dropdownbox
body: <p>I'm totally new to MVC.  I would like to create a Viewbag to contain the selected index of the  control.  Can I set that within my .ascx file? or what would be the best way to capture this information?           </p>
  
  <pre><code>&lt;select id="accounttype" style="float: left;" autocomplete="off"&gt;
                  &lt;% 
                      if (Request.Url.AbsolutePath.ToUpper().StartsWith("/COMMERCIAL")) //Commercial
                      {
                  %&gt;
                  &lt;option value="C" selected="selected"&gt;eManager+&lt;/option&gt;
                  &lt;option value="C"&gt;Retirement Plans&lt;/option&gt;
                  &lt;option value="C"&gt;Brokerage Accounts&lt;/option&gt;
                  &lt;%
                      }
                      else if (Request.Url.AbsolutePath.ToUpper().StartsWith("/BUSINESS")) //Business
                      {
                  %&gt;
                  &lt;option value="B" selected="selected"&gt;eManager+&lt;/option&gt;
                  &lt;option value="B"&gt;Business Credit Card&lt;/option&gt;
                  &lt;option value="B"&gt;Retirement Plans&lt;/option&gt;
                  &lt;option value="B"&gt;Brokerage Accounts&lt;/option&gt;
                  &lt;%
                      }
                      else //Personal, root or other
                      {
                  %&gt;
                  &lt;option value="P" selected="selected"&gt;Online Banking&lt;/option&gt;
                  &lt;option value="P"&gt;Health Savings Account&lt;/option&gt;
                  &lt;option value="P"&gt;Paychek Plus!&amp;reg;&lt;/option&gt;
                  &lt;option value="P"&gt;Gift Cards&lt;/option&gt;
                  &lt;option value="P"&gt;Business Tax Manager&lt;/option&gt;
                  &lt;option value="P"&gt;Business Card Manager&lt;/option&gt;
                  &lt;option value="P"&gt;Business Credit Card&lt;/option&gt;
                  &lt;%
                      }
                  %&gt;
              &lt;/select&gt;
  </code></pre>