title: Dynamically update dropdownlist
body: <p>I have this dropdownlist populated and everything. The only problem is that whenever I add a new item in the database through my website, the dropdownlist doesn't update for some reason.</p>
  
  <pre><code>private CurrentUser _cu = new CurrentUser();//just to check if use is an admin or not.
  
      protected void Page_Load(object sender, EventArgs e)
      {           
          _cu = (CurrentUser)Session[Common.SessVariables.CurUser];
          if (!_cu.CanReport) { Response.Redirect("~/default.aspx"); }
  
          CurrentUser cu = (CurrentUser)Session[Common.SessVariables.CurUser];
          if (!IsPostBack)
          {
              foreach (PrefixAdd loc in cu.Prefix)//Prefix is a Property
              {
                  ListItem x = new ListItem(loc.Prefix);
                  PrefixID.Items.Add(x);
              }
          }
  
      }
  </code></pre>
  
  <p>@Wayne I'm using a store procedure to just insert a Prefix like Pre,yes,sey, etc. Then the list is populated with prefixes.</p>
  
  <pre><code>StringBuilder sbSQL = new StringBuilder(255);
  sbSQL.Append(string.Format("exec insPrefix @Prefix=N'{0}';", PrefixBox.Text.Trim()));
  string msg = string.Empty;
  msg = (_oDAW.ExecuteNonQuery(sbSQL.ToString())) ? string.Format(Common.GetAppSetting(Common.ConfigKeys.User_Submit_Success), 
  PrefixBox.Text.Trim()) : Common.GetAppSetting(Common.ConfigKeys.SubmitFail); //this is a somewhat custom method for CS and databinding.
  </code></pre>
  
  <p>@ Yuriy Rozhovetskiy Yea I add new items to this page with the dropdownlist.</p>