// Create a new Product object.
Product product = new product
{
product.id = TextBox1.Text,
product.name = TextBox2.Text
};
// Add the new object to the Product collection.
dc1.Products.InsertOnSubmit(product);
// Submit the change to the database.
try
{
dc1.SubmitChanges();
}