The GridView control displays the values of a data source in a table. Each column represents a field, while each row represents a record. The GridView control supports the following features,
- Binding to data source controls, such as SqlDataSource.
- Built-in sort capabilities.
- Built-in update and delete capabilities.
- Built-in paging capabilities.
- Built-in row selection capabilities.
- Programmatic access to the GridView object model to dynamically set properties, handle events, and so on.
- Multiple key fields.
- Multiple data fields for the hyperlink columns.
- Customizable appearance through themes and styles.
Creating a GridView
- <asp:GridView ID="gridService" runat="server">
- </asp:GridView>
For further info click on the link,
Question 41 - What is the difference between ASP.NET Web API and WCF?
Answer: The ASP. NET Web API is a framework that uses the HTTP services and makes it easy to provide the response to the client request. The response depends on the request of the clients. The Web API builds the HTTP services, and handles the request using the HTTP protocols. The request may be GET, POST, DELETE, PUT. We can also say that the ASP. NET Web API:
- Is an HTTP service.
- Is designed for reaching the broad range of clients.
- Uses the HTTP application.
We use the ASP. NET Web API for creating the REST ful (Representational State Transfer) services.
The following are some important points of the ASP. NET Web API,
- The ASP. NET Web API supports the MVC application features that are controller, media formatters, routing etcetera.
- It is a platform for creating the REST services.
- It is a framework for creating the HTTP services.
- Responses can be formatted by the APIs MediaTypeFormatter into the Java Script Object Notation (JSON) and Extencible Markup Language (XML) formats.