If you are using visual studio 2005, it is easy. Just add a data connection to the sql server, open it and find the table you want to work with. Then drag the table onto your form.
A bit better: in VS2005, from the toolbox, drag a sqldatasource control from the “Data” section onto your web form. Then configure it (table name or stored proc). Then pick any data-bindable control, like a gridview, dag it onto your form, and select the data source you just created.
The more professional approach is to write a data access layer class in C# that does the database work and use that class as an object data source for your control.
Go to the MSDN website and you will find lots of excellent tuturials.
How Do I Connect To An Sql Server 2000 Database From My Asp.net Application?
December 19th, 2009 by CTO WebOjO.com website designers Lahore Pakistan Leave a reply »
Advertisement
http://weblogs.asp.net/scottgu/archive/2…