title: ASP.NET Web Pages with Razor
body: <p>how to get the name of select tag and use to if condition here is my code:</p>
  
  <pre><code>@{
       var size="";
       if(Request.Form["cboSize"] == "Extra Small (XS)"){
         size = "Extra Small (XS)";
       }
       ...
   }
  &lt;select name="cboSize"&gt;
       &lt;option value="xs"&gt;Extra Small (XS)&lt;/option&gt;
       &lt;option value="s"&gt;Small (S)&lt;/option&gt;
       &lt;option value="m"&gt;Medium (M)&lt;/option&gt;
       &lt;option value="l"&gt;Large (L)&lt;/option&gt;
       &lt;option value="xl"&gt;Extra Large (XL)&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>