Nishant Arora
What is purpose of DataBind method in ASP.NET?
Posted by Nishant Arora in .Net | ASP.NET on Nov 26, 2012
  • 0
  • 3
  • 1341
Do you know the answer for this question? Post it below.
Guest
Posted by Neena M on Dec 10, 2012
  • 1

The purpose of databind is to bind the data so as to display i.e string query1 = "Select * from Links"; SqlConnection con1 = new SqlConnection(strcon); SqlCommand cmd1 = new SqlCommand(query1, con1); SqlDataReader sdr1; con1.Open(); sdr1 = cmd1.ExecuteReader(); gridLink.DataSource = sdr1; gridLink.DataBind(); con1.Close();

Posted by Neena M on Dec 10, 2012
  • 0

The purpose of databind is to bind the data so as to display i.e string query1 = "Select * from table_name"; SqlConnection con1 = new SqlConnection(strcon); SqlCommand cmd1 = new SqlCommand(query1, con1); SqlDataReader sdr1; con1.Open(); sdr1 = cmd1.ExecuteReader(); gridView1.DataSource = sdr1; gridView1.DataBind(); con1.Close();

Posted by Manoj Kumar on Nov 29, 2012
  • 0

to bind data eg. gridview1.datasource=dataset; gridview1.dataBind();


SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Join a Chapter
PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | ABOUT US | REPORT ABUSE
2013© C# Corner. All contents are copyright of their authors.