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 will do to avoid prior case?
Explain what inheritance is, and why it's important?
What does cil do?
How will you make .NET programs work in Linux ?
Explain what is the difference between web application and enterprise application?
What is the difference between asp.net and asp?
What is Entity Relationship Model in .NET?
What is the difference between web application and enterprise application?
What is Full trust permission set in .Net
Explain .NET architecture?
Give a brief introduction on side-by-side execution. Can two applications, one using private assembly and the other using the shared assembly be stated as side-by-side executables?
What is the use of design pattern?
Describe the Managed Execution Process
What is dot net and its uses?
How is .net able to support multiple languages?