Apply same sql connection string to whole winform?
<p>I would like to apply my connection string to the whole winform. If I do this in this case - it will apply to the whole win form, but then i cannot use textbox to enter details:</p>

<pre><code>public partial class Form1 : Form
{
    SqlConnection myConnection = new SqlConnection("user id=userName;" +
    "password=userPass;" +
    "server=.;" +
    "Trusted_Connection=yes;" +
    "database=dbName; " +
    "MultipleActiveResultSets=True;" +
    "connection timeout=30");

    public Form1()
    {
        InitializeComponent();
    }
</code></pre>

<p>And if I will use with textbox I will need to enter the connection string to each method.</p>

<p>Is there anyway to get around it?</p>
