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
Explain what is the difference between web application and enterprise application?
In code behind class, name the type of code found. Is it the server side code or client side code?
Explain is the jit an interpreter?
What is 'Common Type System' (CTS) in .NET?
Please explain what is heap and what is stack?
What does stateless mean?
Is there any attempt system for microsoft technology papers?
What is STA in .NET?
Explain what is a delegate?
Compare client server application with n-tier application
what are connection strings?
How do you define the lease of the object in .net?
What is Code group in .Net with respect to CAS
What is the need of OLE-automation?
What are virtual destructures?