GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ADO.NET 2.0
Go To First  |  Previous Question  |  Next Question 
 ADO.NET 2.0  |  Question 4 of 19    Print  
How to bind the controls(best practice) comboboxes to the data in the dataset ?

  
Total Answers and Comments: 4 Last Update: May 22, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 27, 2005 05:06:32   #1  
susant_nahak Member Since: September 2005   Contribution: 3    

RE: How to bind the controls(best practice) combo...
Using DataBind() Method.
 
Is this answer useful? Yes | No
October 07, 2005 03:46:29   #2  
Sudhakar Leo        

RE: How to bind the controls(best practice) combo...
I will give the cod e for itComboBox1.DataSorce ds;ComboBox1.DataTextField ColumnNameOfTheTable ;ComboBox1.DataBind();
 
Is this answer useful? Yes | No
March 24, 2006 07:48:44   #3  
Sathiyavathi        

RE: How to bind the controls(best practice) combo...

Hi

I'll give an example for this :


DataTable dt new DataTable();
OleDbConnection con new OleDbConnection();
OleDbCommand com new OleDbCommand( Select * From Employees con);
OleDbDataAdapter da new OleDbDataAdapter();
da.SelectCommand com;
da.Fill(dt);
DropDownList1.DataSource dt;
DropDownList1.DataBind();


 
Is this answer useful? Yes | No
May 22, 2006 09:19:01   #4  
Sanjar        

RE: How to bind the controls(best practice) combo...

The achive the best performance in databiding always use

Dim _Li as ListItem

While _Reader.Read()

_Li new ListItem(_Reader(1) _Reader(0))

_dropdownList.Items.add(_Li)

End While

You can check with performance counter to check in real.

Cheers

Sanjar

niyazi.khan@gmail.com


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape