ADO.Net - how to get data from database and bind to the
controls -- write this small code

Answer Posted / kaarthikeyan

establish a connection and declare sqldataadapter,dataset
sda=new sqldataadapter("select the appropriate
table",connectionobj);
ds=new dataset();
sda.fill(ds);
gridview1.datasource=ds;
gridview1.databind();

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is asp.net and .net are same or different?

706


What is the purpose of asp.net?

720


Explain diff between dataset and datareader?

703


Explain about secure socket layer?

708


What is asp.net ajax?

714


How will you maintain versioning in asp.net 2.0?

754


What is data cache in sql server?

805


What is asp according to you?

731


What is difference between asp state management and asp.net state management?

794


Is viewstate secure?

721


How would you create a permanent cookie?

780


What is the function of new view engine in asp.net? : asp.net mvc

734


Can you explain composite pattern?

778


What is the purpose of master page?

697


What are sql joins?

754