Quantcast
Viewing latest article 3
Browse Latest Browse All 13

Updated Wiki: Home

ASP.NET GenericDataSource

Project Description

The ASP.NET Generic Data Source control may be used as the DataSource for any ASP.NET data-bound controls: GridView, ListView, FormView, DropDownList, DetailsView, Repeater, etc, delivering true flexibility, separation of concerns and real support for the ASP.NET web development.

Why to use the ASP.NET GenericDataSource?

  • it may be the DataSource for any ASP.NET data-bound control: GridView, ListView, FormView, DetailsView, DropDownList, BulletedList, Repeater, etc.
  • it is design for RAD (Rapid Application Development), but with respects to best practices and proven standards: it may be used for very simple websites, but also for the huge enterprise web applications.
  • no need for additional settings over the data-bound controls; the GenericDataSource works just as any other ASP.NET DataSource, therefore it may successfully replace the ObjectDataSource, LinqDataSource or EntityDataSource.
  • no need for any other DataSource configuration, like EntityTypeName, SelectMethod, InsertMethod, SelectCountMethod,; it is very simple and straightforward to use the GenericDataSource: just implement the handlers that you need: Select, Update, Insert and Delete.
  • it has great support for paging and sorting; it naturally works with GridView paging and sorting, but also with ASP.NET 3.5 DataPager.
  • since it doesn't require any configuration, the GenericDataSource is very flexible when it comes to code refactoring (as opposite to the nightmare of refactoring when working with the ObjectDataSource)
  • it is designed for performance, since it doesn't use any reflection.
  • developers really enjoy ASP.NET web development.

Is as simple as this
<%@ Register Assembly="GenericDataSourceControl" Namespace="GenericDataSourceControl" TagPrefix="cc1" %>

...

<cc1:GenericDataSource ID="GenericDataSource1" runat="server"
  OnSelectHandler="GenericDataSource1_SelectHandler"
  OnInsertHandler="GenericDataSource1_InsertHandler"
  OnUpdateHandler="GenericDataSource1_UpdateHandler"
  OnDeleteHandler="GenericDataSource1_DeleteHandler">
</cc1:GenericDataSource>

...

<asp:GridView ID="GridView1" runat="server" DataSourceID="GenericDataSource1" AllowSorting="True" AllowPaging="true" DataKeyNames="ID" PageSize="4">
...
<asp:GridView>

Viewing latest article 3
Browse Latest Browse All 13

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>