HOW TO FILL GRID VIEW WITH OUT USING SQLDATASOURCE AND
PROGRAMING?
Answer Posted / sai_sanju84@yahoo.com
we can fill grid view by using sqldataadapter and dataset.
the code will be as follows........
using System.data.sqlclient (add namespace)
in code part....
sqlconnection con=new sqlconnection("server=(the server
which u use);database=(database in which your table
located);user id=;password=");
sqldataadapter da=new sqldataadapter("select * from
table",con);
dataset ds=new dataset();
da.fill(ds);
gridview1.datasourse=ds;
gridview1.databind();
| Is This Answer Correct ? | 8 Yes | 3 No |
Post New Answer View All Answers
What are the advantages and drawbacks of using ado.net?
Which control of the BindingNavigator returns the current position within the data source?
What is the difference between a datareader and a dataset?
Explain ODP.net
What provider ado.net use by default? Explain the role of data provider in ado.net?
What is the use of SqlCommandBuilder?
Explain how do you connect to sql server database without using sqlclient?
Why edit is not possible in repeater?
What do you mean by performing asynchronous operation using command object?
Explain how to create dynamic gridview?
What is the difference in an abstract class and an interface?
What is DataReader Object?
If a table contains 20000 records. In a page at each time 100 records to be displayed.
What is Serialization in .NET? what are the types of Serialization?
What is difference between ado.net and asp net?