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
How many design patterns can be created in .net?
What are the challenging issues you have faced in implementation project/Maintainance project in .net Functionality? How you have overcome that issue?
Explain about Behavioral design pattern?
What is the difference between task and thread in .net?
What is gac in .net?
What is loosely coupled solution in.net?
How do you turn off cookies for one page in your site? Give an example.
Why is .net used?
I want to serialize instances of my class. Should I use xmlserializer, soapformatter or binaryformatter?
Explain the difference between the while and for loop.
What data providers available in .net to connect to database?
With these events, why wouldn't microsoft combine invalidate and paint, so that you wouldn't have to tell it to repaint, and then to force it to repaint?
What does jit compilation do in .net?
What are situations when you register .NET assembly in GAC ?
How do you instantiate a complex number?