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
What is session handling in a webfarm, how it can work with its limits?
What are the event handlers that we can have in global.asax file?
How will you load dynamic assembly? How will create assesblies at run time?
What are the security types in ASP/ASP.NET? Different Authentication modes?
Can I tap into other windows livetm services?
How can you identify that the page is post back?
What are demand-paging and pre-paging?
What are triggers of an updatepanel?
How to create events for a control?
What is http session state?
Can we have a web application running without web.config file?
When should I use server transfer and response redirect?
How many types of controls are there in asp.net?
What are the uses of reflection?
What is the basic purpose of the required field validator? How can you use a required field validator to check that the user changes the initial value of a text box? a listbox?