title: My connection string is not accepting in creating a web form using C#
body: <p><code>Executenonquerry()</code> is giving error for everythng i try whether it's about changing <code>Table</code> to <code>[Table]</code> as my database table which i created in visual studio itself is <code>Table</code> plus it's not working in either web forms or desktop forms </p>
  
  <pre><code>//getting error of connectivity for everythng i try
  using System;  
  using System.Collections.Generic;  
  using System.Linq;  
  using System.Web;  
  using System.Web.UI;  
  using System.Web.UI.WebControls;  
  using System.Xml.Linq;  
  using System.Data;  
  using System.Data.Sql;    
  using System.Data.SqlClient;  
  
  namespace DatabaseProject  
  {  
      public partial class WebForm1 : System.Web.UI.Page  
      {  
          protected void Page_Load(object sender, EventArgs e)  
          {  
  
          }  
  
          protected void TextBox1_TextChanged(object sender, EventArgs e)  
          {  
  
          }  
  
          protected void Button1_Click(object sender, EventArgs e)  
          {  
              //inserting into the database..  
              SqlConnection myconnection = new SqlConnection(@"Data Source=(LocalDB)\v11.0;server=local;AttachDbFilename=C:\Users\MRD0100\Documents\dbms.mdf;Integrated Security=True;Connect Timeout=30");
              SqlCommand myCommand = new SqlCommand("INSERT INTO [Table] (Name, Id)"+ " Values ('"+TextBox1.Text+"','"+TextBox2.Text+"')", myconnection);
  
              SqlDataAdapter da = new SqlDataAdapter(myCommand);
              DataSet ds = new DataSet();
              try
              {
                  myconnection.Open();
                  da.Fill(ds);
                  //myCommand.Parameters.Add("@name", SqlDbType.NVarChar).Value = TextBox1.Text;
                  //myCommand.Parameters.Add("@Id", SqlDbType.Int).Value = TextBox2.Text;
                  //myCommand.ExecuteNonQuery();
              }
              catch (SqlException ex)
              {
                  throw ex;
              }
              finally
              {
                  myconnection.Close();
              } 
          }  
  
          protected void TextBox2_TextChanged(object sender, EventArgs e)  
          {  
  
          }  
  
          protected void Button2_Click(object sender, EventArgs e)  
          {  
              //clears the both textboxes..  
              TextBox1.Text="";  
              TextBox2.Text="";      
          }  
      }  
  }    
  </code></pre>
  
  <p><strong>EDIT:</strong> Error:</p>
  
  <blockquote>
    <p>A network-related or instance-specific error occurred while
    establishing a connection to SQL Server. The server was not found or
    was not accessible. Verify that the instance name is correct and that
    SQL Server is configured to allow remote connections. (provider: Named
    Pipes Provider, error: 40 - Could not open a connection to SQL Server)</p>
  </blockquote>