Anyone can help me to give link or website / tutorial about binding data with gridview ??....
diru
0
Newbie Poster
Recommended Answers
Jump to PostTry this:
SqlConnection cn = new SqlConnection("Your ConnectionsString here"); SqlCommand cmd = new SqlCommand("Query to Retrieve data from database",cn); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds, "Data"); gridview.DataSource = ds.Tables[0]; gridview.DataBind();
define the variables globally if u want to use them more thn …
All 2 Replies
Reply to this topic
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.