title: Binding textboxes to database (C# web developer)
body: <p>I am using Microsoft Visual Web Developer 2010 Express. I have been trying to enter my textbox input into a database table I created. I ran into a problem using the DataBinding property (located under the BindTextBoxes method at the bottom). I searched the internet and found out that the DataBinding property does not exist in Web Developer. Is there an alternate way to transfer the textbox input into a database table?</p>
  
  <p>Here is database part of my code (in C#):</p>
  
  <pre><code>    namespace WebApplication2
      {
          public partial class _Default : System.Web.UI.Page
          {
       //used to link textboxes with database
       BindingSource bsUserDetails = new BindingSource();
  
       //info stored in tables
       DataSet dsUserDetails = new DataSet();
  
       //manages connection between database and application
       SqlDataAdapter daUserDetails = new SqlDataAdapter();
  
       //create new SQL connection
       SqlConnection connUserDetails = new SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=D:\Users\synthesis\Documents\Visual Studio 2010\Projects\Practical\Practical\App_Data\UserDetails.mdf;Integrated Security=True;User Instance=True");
  
       protected void Page_Load(object sender, EventArgs e)
       {
           //link textboxes to relevant fields in the dataset
           bsUserDetails.DataSource = dsUserDetails;
           bsUserDetails.DataMember = dsUserDetails.Tables[0].ToString();
  
           //call BindTextBoxes Method
           BindTextBoxes();
  
       private void BindTextBoxes()
       {
       txtBoxCell.DataBindings.Add(new Binding("Name entered into txtBox", bsUserDetails,              
       "Name column in database table", true));
       }
     }
   }
  </code></pre>