if i have 1000 records and i want to access 20 ata time
from SQL server, what will be the query?
Answer Posted / sunny
Assume EMP is my Table where 1000 Records there. We retrive
20 top record from database through by following c# code.
}
sqlconection cn = new sqlconnection(@"Conection string...");
dataset ds = new dataset();
SqldataAdapter da = new SqldataAdapter("select top 20 *
from Emp", cn);
da.fill(ds);
Gridview1.datasource = ds.table[0];
Gridview1.databind();
}
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Explain the difference between inline and code behind - which is best in?
Which is the parent class of the ASP.NET server control?
What is the maximum number of classes that can be contained in one dll file?
What are the various types of cookies in asp.net?
Difference between DataGid and Girdview? Difference b/w .Net 2.0, 3.0 and 3.5 ? Diff b/w dispose & Finialize Methods?
What are the events in a page life cycle?
What is asp.net futures?
What role “#&&” plays in a querysting?
How asp.net mvc differs from asp.net web forms? : asp.net mvc
How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them ?
Is asp.net and .net the same?
What is bson in web api?
How can you display all validation messages in one control?
How do we assign page-specific attributes?
Where can I get information on cookies in asp.net?