title: computation after choosing on a dropdownlist
body: <p>I'm creating a simple patients billing program using Asp.net c#. Now, I have a dropdownlist with items "Ward" , "Semi Private" and "Private" If the user would choose ward the textbox below it would automatically be 700, if Semi Private it should be 1000 and if Private it should be 2000. I also have a textbox under it indicating how many days the patient stayed, the user is the one who should input the days, and for example he's from the ward room and the days he stayed was 3 then the computation should be 700 * 3. I also have a textbox that will display the answer. I hope u guys understand the things I explained above. So far, here are my codes:</p>
  
  <p>Default.aspx</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  
  public partial class _Default : Page
  {
  
      protected void Page_Load(object sender, EventArgs e)
      {
  
      }
  
      protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
      {
          if (DropDownList1.Text == "Ward")
          {
              TextBox4.Text = "700";
          }
  
          if (DropDownList1.Text == "Semi Private")
          {
              TextBox4.Text = "1000";
          }
  
          if (DropDownList1.Text == "Private")
          {
              TextBox4.Text = "2000";
          }
      }
  
      protected void Button1_Click(object sender, EventArgs e)
      {
  
      }
  }      
  </code></pre>