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
What should you do to store an object in a viewstate?
What is the transport protocol you use to call a seb service soap?
What is lambda expressions in c#?
What does jit compilation do in .net?
What operating systems does the .net framework run on?
What is the difference between a class and an object, and how do these terms relate to each other?
What is an exe and a dll?
Difference between dispose and finallize method?
how can i create a table from front end to back end in wabe page?
What are the different types of memory in .net?
What is new in .net core?
Explain what is the difference between web application and enterprise application?
Explain about .NET services?
What is .net assembly?
How to instantiate a delegate?