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

Define web.config in .net?

734


Why do we use sessions?

674


Is redux flux?

614


Write a code for sending an email from asp.net application.

641


What does asp in asp.net stand for?

625






Explain what is clr?

717


What is the purpose of using MVC programming pattern in ASP.NET?

638


In which event of the page viewstate is available?

549


Can you explain page lifecycle in net?

593


Mention the namespace that is used to include .net data provider for sql server in .net code?

582


Why is global asax is used for?

602


What is custom attribute?

651


What is http only cookie?

633


Can we have 2 web config files?

620


What will happen if the server confugration file and the application confugration file have different values for sassion state ASP.NET?

859