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 About GDI object ?
how can i create a table from front end to back end in wabe page?
What's a windows process in .net?
What is Flyout Design Pattern in .NET?
What does cli do?
What do you mean by Driver Script?
What are virtual destructures?
What is the difference between function and stored procedure?
What tools can I use to develop .net applications?
Explain why do we use the “using” statement?
What is namespace in .net?
What is Event Bubbling in .NET?
If any body working in Infosys, please can u give me the referense to that company because i hered that their is openings for freshers with referal..
What is boxing and un-boxing in .net?
Do you know what are three common acronyms used in .net, and what do they stand for?