ASP.NET 2.0 ProfessionalIf you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
What about the following, this is answering you question, cheers
Dim ds As New Data.DataSet
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim con As New SqlClient.SqlConnection("data source=Nesrine;initial catalog=ASPNETDB;integrated security=true")
Dim da As New SqlClient.SqlDataAdapter("select ContactId,Title,EmailAddress,FirstName,LastName from Person.Contact", con)
1.put the sqldatsascource into your contentplaceholder
2. use the sqldatascource wizard to configure your *.mdb database
3.put the grid view next to your sqldatascource
4.use the gridview wizard to select your sqldatascoure
p.s
by configuring the sqldatascource you can set up a sql query
I have also a question concerining sqldatascources using a button to change the datascource by click.
Does someone know the c# code for setting up a new sqldatascource by clicking a button?