Answer Posted / prasanth
data reader can be used to databind gri view
void Page_Load(Object sender, EventArgs e){ String Q; Sql
command cmd; Sql DataReader dr; SqlConnection conn = new
SqlConnection(); conn.ConnectionString =
ConfigurationManager.ConnectionStrings
["cn"].ConnectionString.ToString(); conn.Open
(); Q = "select * from tablename";
cmd= New Sqlcommand(Q, conn); dr =
cmd.ExecuteReader();
Gridview1.DataSource = dr; Gridview1.DataBind();}
| Is This Answer Correct ? | 17 Yes | 4 No |
Post New Answer View All Answers
Is .net a compiler?
what is dotnet architecture? can anyone explain that.
How is .net core cross platform?
What's typical about a windows process in regards to memory allocation in .net?
What is the difference between override and overload in a method?
What is an assembly? What are the different types of assemblies?
How can I get at the win32 api from a .net program?
Explain can 2 different applications use the same dll in gac at the same time?
Define code access security (cas)?
What does cil do?
Explain re-clarification of object based in .net?
Explain code access security.
Please explain what is a delegate?
What is finalize method in .net?
What is a .DLL and .EXE files called in .NET?