title: How do you use an if condition in a dropdownlist in c#
body: <p>I have the following ASP.net code that I want to port to C#.</p>
  
  <pre><code>Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
      If DropDownList1.SelectedItem.Text = "1" Then
          Response.Redirect("default.aspx")
      ElseIf DropDownList1.SelectedItem.Text = "2" Then
          Response.Redirect("default.aspx")
      End If
  End Sub
  </code></pre>
  
  <p>How should I go about this?</p>