sample asp.net with c# sql database connection

Where you supposed to enter this into google ?

Have a look at this

SqlConnection cn = new SqlConnection("server=localhost;database=Database name;trusted_connection=true");
    cn.Open();

this won't help i hv tried above code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.